-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathDockerfile
56 lines (45 loc) · 2.21 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM debian:stable-slim
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
maintainer.1="Pedro Branco (@pedrobranco)" \
maintainer.2="Rui Marinho (@ruimarinho)"
RUN useradd -r litecoin \
&& apt-get update -y \
&& apt-get install -y curl gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& set -ex \
&& for key in \
# Litecoin (davidburkett38’s key)
3620E9D387E55666 \
# Gosu (tianon's key)
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
; do \
gpg --no-tty --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --no-tty --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --no-tty --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --no-tty --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
done
ENV GOSU_VERSION=1.10
RUN curl -o /usr/local/bin/gosu -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture) \
&& curl -o /usr/local/bin/gosu.asc -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture).asc \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
ARG TARGETPLATFORM
ENV LITECOIN_VERSION=0.21.2.2
ENV LITECOIN_DATA=/home/litecoin/.litecoin
RUN set -ex \
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
&& if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \
&& curl -SLO https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-${TARGETPLATFORM}.tar.gz \
&& curl -SLO https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/SHA256SUMS.asc \
&& gpg --verify SHA256SUMS.asc \
&& grep $(sha256sum litecoin-${LITECOIN_VERSION}-${TARGETPLATFORM}.tar.gz | awk '{ print $1 }') SHA256SUMS.asc \
&& tar --strip=2 -xzf *.tar.gz -C /usr/local/bin \
&& rm *.tar.gz
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME ["/home/litecoin/.litecoin"]
EXPOSE 9332 9333 19332 19333 19444
ENTRYPOINT ["/entrypoint.sh"]
CMD ["litecoind"]