doge: docker/production/*

This commit is contained in:
nahuhh 2024-11-28 15:45:04 +00:00 committed by tecnovert
parent f5db8cf7ce
commit 56f96291e4
3 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,16 @@
dogecoin_core:
image: i_dogecoin
build:
context: dogecoin
dockerfile: Dockerfile
container_name: dogecoin_core
volumes:
- ${DATA_PATH}/dogecoin:/data
expose:
- ${DOGE_RPC_PORT}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: unless-stopped

View file

@ -0,0 +1,25 @@
FROM i_swapclient as install_stage
RUN basicswap-prepare --preparebinonly --bindir=/coin_bin --withcoin=dogecoin --withoutcoin=particl && \
find /coin_bin -name *.tar.gz -delete
FROM debian:bullseye-slim
COPY --from=install_stage /coin_bin .
ENV DOGECOIN_DATA /data
RUN groupadd -r dogecoin && useradd -r -m -g dogecoin dogecoin \
&& apt-get update \
&& apt-get install -qq --no-install-recommends gosu \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir "$DOGECOIN_DATA" \
&& chown -R dogecoin:dogecoin "$DOGECOIN_DATA" \
&& ln -sfn "$DOGECOIN_DATA" /home/dogecoin/.dogecoin \
&& chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
VOLUME /data
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8332 8333 18332 18333 18443 18444
CMD ["/dogecoin/dogecoind", "--datadir=/data"]

View file

@ -0,0 +1,11 @@
#!/bin/bash
set -e
if [[ "$1" == "dogecoin-cli" || "$1" == "dogecoin-tx" || "$1" == "dogecoind" || "$1" == "test_dogecoin" ]]; then
mkdir -p "$DOGECOIN_DATA"
chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
exec gosu dogecoin "$@"
else
exec "$@"
fi