diff --git a/docker/ckpool/Dockerfile b/docker/ckpool/Dockerfile new file mode 100644 index 00000000..d5965d86 --- /dev/null +++ b/docker/ckpool/Dockerfile @@ -0,0 +1,25 @@ +# syntax=docker/dockerfile:1 +FROM ubuntu:20.04 AS build + +# Install tools required for project +# Run `docker build --no-cache .` to update dependencies +RUN apt-get update +RUN apt-get -y install build-essential yasm autoconf automake libtool libzmq3-dev git +RUN git -c http.sslVerify=false clone https://git.markow.su/markow/ckpool.git + +# Build ckpool +WORKDIR ckpool/ +RUN autoupdate +RUN ./autogen.sh +RUN CFLAGS="-fcommon -O2 -Wall -march=native" ./configure +RUN make -j +RUN ldd src/ckpool + +# This results in a single layer image +FROM ubuntu:20.04 +LABEL maintainer="Sergey Markov " +VOLUME [/cfg] +COPY --from=build /lib/x86_64-linux-gnu/libzmq.so.5 /lib/x86_64-linux-gnu/libzmq.so.5 +COPY --from=build /ckpool/src/ckpool /bin/ckpool +ENTRYPOINT ["/bin/ckpool"] +CMD ["-c", "/cfg/ckpool.conf"]