-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac1955b
commit 03d867c
Showing
4 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ jobs: | |
strategy: | ||
matrix: | ||
version: | ||
- '0.21' | ||
- '0.18' | ||
- '0.17' | ||
- '0.16' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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 | ||
|
||
ENV LITECOIN_VERSION=0.21.2.1 | ||
ENV LITECOIN_DATA=/home/litecoin/.litecoin | ||
|
||
RUN curl -SLO https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz \ | ||
&& curl -SLO https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/SHA256SUMS.asc \ | ||
&& gpg --verify SHA256SUMS.asc \ | ||
&& grep $(sha256sum litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ $(echo "$1" | cut -c1) = "-" ]; then | ||
echo "$0: assuming arguments for litecoind" | ||
|
||
set -- litecoind "$@" | ||
fi | ||
|
||
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "litecoind" ]; then | ||
mkdir -p "$LITECOIN_DATA" | ||
chmod 770 "$LITECOIN_DATA" || echo "Could not chmod $LITECOIN_DATA (may not have appropriate permissions)" | ||
chown -R litecoin "$LITECOIN_DATA" || echo "Could not chown $LITECOIN_DATA (may not have appropriate permissions)" | ||
|
||
echo "$0: setting data directory to $LITECOIN_DATA" | ||
|
||
set -- "$@" -datadir="$LITECOIN_DATA" | ||
fi | ||
|
||
if [ "$(id -u)" = "0" ] && ([ "$1" = "litecoind" ] || [ "$1" = "litecoin-cli" ] || [ "$1" = "litecoin-tx" ]); then | ||
set -- gosu litecoin "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters