Skip to content

Commit 534a648

Browse files
committed
add images
0 parents  commit 534a648

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4425
-0
lines changed

0.11/Dockerfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM debian:bookworm-slim
2+
3+
ARG UID=101
4+
ARG GID=101
5+
6+
LABEL maintainer.0="Will Clark (@willcl-ark)"
7+
8+
RUN groupadd --gid ${GID} bitcoin \
9+
&& useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
10+
&& apt-get update -y \
11+
&& apt-get install -y curl gnupg gosu \
12+
&& apt-get clean \
13+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
14+
15+
ENV BITCOIN_VERSION=0.11.2
16+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
17+
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
18+
19+
RUN set -ex \
20+
&& for key in \
21+
01EA5486DE18A882D4C2684590C8019E36C2E964 \
22+
; do \
23+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
24+
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
25+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
26+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
27+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
28+
done \
29+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \
30+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-linux64.tar.gz \
31+
&& gpg --verify SHA256SUMS.asc \
32+
&& grep " bitcoin-${BITCOIN_VERSION}-linux64.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \
33+
&& tar -xzf *.tar.gz -C /opt \
34+
&& rm *.tar.gz *.asc
35+
36+
COPY docker-entrypoint.sh /entrypoint.sh
37+
38+
VOLUME ["/home/bitcoin/.bitcoin"]
39+
40+
EXPOSE 8332 8333 18332 18333 18444
41+
42+
ENTRYPOINT ["/entrypoint.sh"]
43+
44+
CMD ["bitcoind"]

0.11/alpine/Dockerfile

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Build stage for BerkeleyDB
2+
FROM alpine:3.7 as berkeleydb
3+
4+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
5+
RUN apk --no-cache add autoconf
6+
RUN apk --no-cache add automake
7+
RUN apk --no-cache add build-base
8+
RUN apk --no-cache add openssl
9+
10+
ENV BERKELEYDB_VERSION=db-4.8.30.NC
11+
ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION}
12+
13+
RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz
14+
RUN tar -xzf *.tar.gz
15+
RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h
16+
RUN mkdir -p ${BERKELEYDB_PREFIX}
17+
18+
WORKDIR /${BERKELEYDB_VERSION}/build_unix
19+
20+
RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX}
21+
RUN make -j4
22+
RUN make install
23+
RUN rm -rf ${BERKELEYDB_PREFIX}/docs
24+
25+
# Build stage for Bitcoin Core
26+
FROM alpine:3.7 as bitcoin-core
27+
28+
COPY --from=berkeleydb /opt /opt
29+
30+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
31+
RUN apk --no-cache add autoconf
32+
RUN apk --no-cache add automake
33+
RUN apk --no-cache add boost-dev
34+
RUN apk --no-cache add build-base
35+
RUN apk --no-cache add ca-certificates
36+
RUN apk --no-cache add chrpath
37+
RUN apk --no-cache add curl
38+
RUN apk --no-cache add file
39+
RUN apk --no-cache add gnupg
40+
RUN apk --no-cache add libevent-dev
41+
RUN apk --no-cache add openssl
42+
RUN apk --no-cache add openssl-dev
43+
RUN apk --no-cache add libtool
44+
RUN apk --no-cache add linux-headers
45+
RUN apk --no-cache add protobuf-dev
46+
RUN apk --no-cache add zeromq-dev
47+
RUN set -ex \
48+
&& for key in \
49+
90C8019E36C2E964 \
50+
; do \
51+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
52+
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
53+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
54+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
55+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
56+
done
57+
58+
# Workaround for Let's Encrypt DST Root CA X3 expiration.
59+
RUN sed -i 's#mozilla\/DST_Root_CA_X3.crt#!mozilla\/DST_Root_CA_X3.crt#g' /etc/ca-certificates.conf
60+
RUN update-ca-certificates
61+
62+
ENV BITCOIN_VERSION=0.11.2
63+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
64+
65+
RUN curl -O https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
66+
RUN curl -O https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz
67+
RUN gpg --verify SHA256SUMS.asc
68+
RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS.asc | sha256sum -c -
69+
RUN tar -xzf *.tar.gz
70+
71+
WORKDIR /bitcoin-${BITCOIN_VERSION}
72+
73+
COPY patches/warnings.patch /warnings.patch
74+
75+
RUN patch -p0 < /warnings.patch
76+
RUN ./autogen.sh
77+
RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \
78+
--prefix=${BITCOIN_PREFIX} \
79+
--mandir=/usr/share/man \
80+
--disable-tests \
81+
--disable-bench \
82+
--disable-ccache \
83+
--with-gui=no \
84+
--with-utils \
85+
--with-libs \
86+
--with-daemon
87+
RUN make -j4
88+
RUN make install
89+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli
90+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx
91+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoind
92+
RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a
93+
RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0
94+
95+
# Build stage for compiled artifacts
96+
FROM alpine:3.7
97+
98+
LABEL maintainer.0="Will Clark (@willcl-ark)"
99+
100+
RUN addgroup -S bitcoin
101+
RUN adduser -G bitcoin -H -S bitcoin
102+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
103+
RUN apk --no-cache add \
104+
boost \
105+
boost-program_options \
106+
libevent \
107+
openssl \
108+
libzmq \
109+
shadow \
110+
su-exec
111+
112+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
113+
ENV BITCOIN_VERSION=0.11.2
114+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
115+
ENV PATH=${BITCOIN_PREFIX}/bin:$PATH
116+
117+
COPY --from=bitcoin-core /opt /opt
118+
COPY docker-entrypoint.sh /entrypoint.sh
119+
120+
VOLUME ["/home/bitcoin/.bitcoin"]
121+
122+
EXPOSE 8332 8333 18332 18333 18444
123+
124+
ENTRYPOINT ["/entrypoint.sh"]
125+
126+
CMD ["bitcoind"]

0.11/alpine/docker-entrypoint.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh
2+
set -e
3+
4+
if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then
5+
usermod -u "$UID" bitcoin
6+
fi
7+
8+
if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then
9+
groupmod -g "$GID" bitcoin
10+
fi
11+
12+
echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)"
13+
14+
if [ "$(echo "$1" | cut -c1)" = "-" ]; then
15+
echo "$0: assuming arguments for bitcoind"
16+
17+
set -- bitcoind "$@"
18+
fi
19+
20+
if [ "$(echo "$1" | cut -c1)" = "-" ] || [ "$1" = "bitcoind" ]; then
21+
mkdir -p "$BITCOIN_DATA"
22+
chmod 700 "$BITCOIN_DATA"
23+
# Fix permissions for home dir.
24+
chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)"
25+
# Fix permissions for bitcoin data dir.
26+
chown -R bitcoin:bitcoin "$BITCOIN_DATA"
27+
28+
echo "$0: setting data directory to $BITCOIN_DATA"
29+
30+
set -- "$@" -datadir="$BITCOIN_DATA"
31+
fi
32+
33+
if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then
34+
echo
35+
exec su-exec bitcoin "$@"
36+
fi
37+
38+
echo
39+
exec "$@"

0.11/alpine/patches/warnings.patch

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git Makefile.am Makefile.am
2+
index ab68d8fa6..4600e5696 100644
3+
--- Makefile.am
4+
+++ Makefile.am
5+
@@ -1,5 +1,6 @@
6+
ACLOCAL_AMFLAGS = -I build-aux/m4
7+
SUBDIRS = src
8+
+ARFLAGS=cr
9+
.PHONY: deploy FORCE
10+
11+
GZIP_ENV="-9n"
12+
diff --git configure.ac configure.ac
13+
index 5debd219e..da7754042 100644
14+
--- configure.ac
15+
+++ configure.ac
16+
@@ -1,5 +1,6 @@
17+
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
18+
AC_PREREQ([2.60])
19+
+ARFLAGS=cr
20+
define(_CLIENT_VERSION_MAJOR, 0)
21+
define(_CLIENT_VERSION_MINOR, 11)
22+
define(_CLIENT_VERSION_REVISION, 2)
23+
diff --git src/compat.h src/compat.h
24+
index 20c2a2514..feaa544e2 100644
25+
--- src/compat.h
26+
+++ src/compat.h
27+
@@ -32,7 +32,7 @@
28+
#include <windows.h>
29+
#include <ws2tcpip.h>
30+
#else
31+
-#include <sys/fcntl.h>
32+
+#include <fcntl.h>
33+
#include <sys/mman.h>
34+
#include <sys/socket.h>
35+
#include <sys/types.h>
36+
diff --git src/secp256k1/configure.ac src/secp256k1/configure.ac
37+
index 3dc182951..8d85fb225 100644
38+
--- src/secp256k1/configure.ac
39+
+++ src/secp256k1/configure.ac
40+
@@ -1,4 +1,5 @@
41+
AC_PREREQ([2.60])
42+
+AR_FLAGS=cr
43+
AC_INIT([libsecp256k1],[0.1])
44+
AC_CONFIG_AUX_DIR([build-aux])
45+
AC_CONFIG_MACRO_DIR([build-aux/m4])
46+
/bitcoin-0.11.2 #

0.11/docker-entrypoint.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then
5+
usermod -u "$UID" bitcoin
6+
fi
7+
8+
if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then
9+
groupmod -g "$GID" bitcoin
10+
fi
11+
12+
echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)"
13+
14+
if [ "$(echo "$1" | cut -c1)" = "-" ]; then
15+
echo "$0: assuming arguments for bitcoind"
16+
17+
set -- bitcoind "$@"
18+
fi
19+
20+
if [ "$(echo "$1" | cut -c1)" = "-" ] || [ "$1" = "bitcoind" ]; then
21+
mkdir -p "$BITCOIN_DATA"
22+
chmod 700 "$BITCOIN_DATA"
23+
# Fix permissions for home dir.
24+
chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)"
25+
# Fix permissions for bitcoin data dir.
26+
chown -R bitcoin:bitcoin "$BITCOIN_DATA"
27+
28+
echo "$0: setting data directory to $BITCOIN_DATA"
29+
30+
set -- "$@" -datadir="$BITCOIN_DATA"
31+
fi
32+
33+
if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then
34+
echo
35+
exec gosu bitcoin "$@"
36+
fi
37+
38+
echo
39+
exec "$@"

0.12/Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM debian:bookworm-slim
2+
3+
ARG UID=101
4+
ARG GID=101
5+
6+
LABEL maintainer.0="Will Clark (@willcl-ark)"
7+
8+
RUN groupadd --gid ${GID} bitcoin \
9+
&& useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
10+
&& apt-get update -y \
11+
&& apt-get install -y curl gnupg gosu \
12+
&& apt-get clean \
13+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
14+
15+
ENV BITCOIN_VERSION=0.12.1
16+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
17+
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
18+
19+
RUN set -ex \
20+
&& for key in \
21+
01EA5486DE18A882D4C2684590C8019E36C2E964 \
22+
; do \
23+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
24+
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
25+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
26+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
27+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
28+
done \
29+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \
30+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-linux64.tar.gz \
31+
&& gpg --verify SHA256SUMS.asc \
32+
&& grep " bitcoin-${BITCOIN_VERSION}-linux64.tar.gz\$" SHA256SUMS.asc | sha256sum -c - \
33+
&& tar -xzf *.tar.gz -C /opt \
34+
&& rm *.tar.gz *.asc
35+
36+
COPY docker-entrypoint.sh /entrypoint.sh
37+
38+
VOLUME ["/home/bitcoin/.bitcoin"]
39+
40+
EXPOSE 8332 8333 18332 18333 18444
41+
42+
ENTRYPOINT ["/entrypoint.sh"]
43+
44+
RUN bitcoind -version | grep "Bitcoin Core Daemon"
45+
46+
CMD ["bitcoind"]

0 commit comments

Comments
 (0)