- reduced image size
- run.sh accepts image tag as first arg
This commit is contained in:
+26
-10
@@ -1,13 +1,13 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
# -------------------------------------
|
||||||
FROM ubuntu:jammy as base
|
FROM ubuntu:jammy as base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Update
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get upgrade
|
|
||||||
|
|
||||||
# Required dependencies
|
# Required dependencies
|
||||||
RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
|
RUN apt-get install -y libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libevent-dev libssl-dev
|
||||||
RUN apt-get install -y libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
|
|
||||||
|
|
||||||
# Qt (required for dogecoin-qt GUI)
|
# Qt (required for dogecoin-qt GUI)
|
||||||
RUN apt-get install -y libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
|
RUN apt-get install -y libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
|
||||||
@@ -24,22 +24,38 @@ RUN apt-get install -y libzmq3-dev
|
|||||||
# Miniupnpc
|
# Miniupnpc
|
||||||
# RUN apt-get install -y libminiupnpc-dev
|
# RUN apt-get install -y libminiupnpc-dev
|
||||||
|
|
||||||
# Build tools
|
|
||||||
RUN apt-get install -y git autogen make gawk file
|
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
FROM base as sources
|
FROM base as build_base
|
||||||
|
|
||||||
|
# Build tools
|
||||||
|
RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils git autogen make gawk file
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
FROM build_base as build
|
||||||
ADD https://github.com/dogecoin/dogecoin.git /tmp/dogecoin
|
ADD https://github.com/dogecoin/dogecoin.git /tmp/dogecoin
|
||||||
|
|
||||||
FROM sources as conf
|
|
||||||
WORKDIR "/tmp/dogecoin"
|
WORKDIR "/tmp/dogecoin"
|
||||||
RUN ./autogen.sh >autogen.log
|
RUN ./autogen.sh >autogen.log
|
||||||
RUN ./configure --with-gui >configure.log
|
RUN ./configure --with-gui -prefix=/opt/dogecoin/ >configure.log
|
||||||
|
|
||||||
FROM conf as make
|
|
||||||
WORKDIR "/tmp/dogecoin"
|
WORKDIR "/tmp/dogecoin"
|
||||||
RUN make -j4 && make install
|
RUN make -j4 && make install
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
FROM base as slim_base
|
||||||
|
RUN apt-get purge -y python3
|
||||||
|
RUN apt-get autoremove --purge -y
|
||||||
|
RUN apt-get clean -y
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
FROM slim_base as app
|
||||||
|
COPY --from=build /opt/dogecoin /opt/dogecoin
|
||||||
|
RUN rm /opt/dogecoin/bin/bench_dogecoin*
|
||||||
|
RUN rm /opt/dogecoin/bin/test_dogecoin*
|
||||||
|
|
||||||
RUN useradd -m doge
|
RUN useradd -m doge
|
||||||
|
ENV PATH=$PATH:/opt/dogecoin/bin
|
||||||
|
|
||||||
RUN su - -s /usr/bin/bash doge
|
RUN su - -s /usr/bin/bash doge
|
||||||
WORKDIR "/home/doge"
|
WORKDIR "/home/doge"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
|
||||||
# Run container interactive with X11
|
# Run container interactive with X11
|
||||||
docker container run --rm --net bridge -e DISPLAY=$DISPLAY -v /home/jens/.dogecoin:/home/doge/.dogecoin --user doge -it dogecoin
|
docker container run --rm --net bridge -e DISPLAY=$DISPLAY -v /home/jens/.dogecoin:/home/doge/.dogecoin --user doge -it $1
|
||||||
|
|||||||
Reference in New Issue
Block a user