f910732155
Moved data dir and removed traefik label Moved readme for testnet compose Adding RUN_MODEs regtest and testnet Adding advance_blocks.sh into all lbrycrd containers Adding advance cmd and moved Dockerfile to appropriate dir Cleanup and moved Dockerfiles Moved lbrycrd Dockerfiles to appropriate subdirectories and removed. More moving and deletions Adding catchall output Updated default runmode in example Removed incomplete container directory This should not be in a production branch at this point now that we have stable containers published. Removed incomplete container for now Deleted compile directory and README.md Cleaning up chainquery Deleting placeholders Updated start.sh Removing superfluous .dockerignores & more Adjusted start.sh source path Updated ignores Updated readme in prep for build tags and ship armhf-prod dir start.sh's should be recycled when possible. No sense in code duplication lets try and aim for unification. Docker prefers WORKDIR over cd docker prefers WORKDIR over cd
31 lines
1.3 KiB
Docker
31 lines
1.3 KiB
Docker
FROM ubuntu:18.04 as prep
|
|
LABEL MAINTAINER="leopere [at] nixc [dot] us"
|
|
## TODO: Implement version pinning. `apt-get install curl=<version>`
|
|
RUN apt-get update && \
|
|
apt-get -y install unzip curl build-essential && \
|
|
apt-get autoclean -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
COPY ../stuff/start.sh start
|
|
COPY ../stuff/healthcheck.sh healthcheck
|
|
COPY ../stuff/advance_blocks.sh advance
|
|
COPY ../stuff/fix-permissions.c fix-permissions.c
|
|
RUN curl -L -o ./lbrycrd-linux.zip $(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux.zip' | grep download | head -n 1 | cut -d'"' -f4) && \
|
|
unzip ./lbrycrd-linux.zip && \
|
|
gcc fix-permissions.c -o fix-permissions && \
|
|
chmod +x ./lbrycrdd ./lbrycrd-cli ./lbrycrd-tx ./start ./healthcheck ./fix-permissions ./advance
|
|
|
|
FROM ubuntu:18.04 as app
|
|
COPY --from=prep /lbrycrdd /lbrycrd-cli /lbrycrd-tx /start /healthcheck /fix-permissions /advance /usr/bin/
|
|
RUN addgroup --gid 1000 lbrycrd && \
|
|
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
|
chmod a+s /usr/bin/fix-permissions
|
|
VOLUME ["/data"]
|
|
WORKDIR /data
|
|
## TODO: Implement healthcheck.
|
|
# HEALTHCHECK ["healthcheck"]
|
|
EXPOSE 9246 9245
|
|
|
|
USER lbrycrd
|
|
CMD ["start"]
|