-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
33 lines (26 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM alpine
ARG VERSION=0.17.1
ARG GLIBC_VERSION=2.29-r0
ENV FILENAME bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz
ENV DOWNLOAD_URL https://bitcoin.org/bin/bitcoin-core-${VERSION}/${FILENAME}
RUN apk update \
&& apk --no-cache add wget tar bash ca-certificates \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk \
&& apk --no-cache add glibc-${GLIBC_VERSION}.apk \
&& apk --no-cache add glibc-bin-${GLIBC_VERSION}.apk \
&& rm -rf /glibc-${GLIBC_VERSION}.apk \
&& rm -rf /glibc-bin-${GLIBC_VERSION}.apk \
&& wget $DOWNLOAD_URL \
&& tar xzvf /bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz \
&& mkdir /root/.bitcoin \
&& mv /bitcoin-${VERSION}/bin/* /usr/local/bin/ \
&& rm -rf /bitcoin-${VERSION}/ \
&& rm -rf /bitcoin-${VERSION}-x86_64-linux-gnu.tar.gz \
&& apk del tar wget ca-certificates
EXPOSE 8332 8333 18332 18333 28332 28333
ADD VERSION .
ADD ./bin/docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
RUN chmod a+x /usr/local/bin/docker_entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]