93ea84bb81
Renamed to fit with new nomenclature Removed directory and renamed/moved Dockerfile Updated COPY path Moved docker-compose.yml for Lbrynet Cleaned up comments a bit Important notice to users in new comment Updated compose example for image instead of build updated paths Added a step for chainquery-bootstrap setup Moved and updated lbrycrd's env_file Created lbrynet env_file Moved and updated chainquery's env_file Moved and updated lbrynet's compose file More Cleanup Added TODO's for checkmount.sh Renamed compiler Renamed production container Final rename fixup fixup Updated README refs Just readability improvements Packing directories with the repo Git won't track empty directories but if you take the path of running these containers locally from within this repo you should have this directory. Updated image refs to final production locations
31 lines
1.3 KiB
Text
31 lines
1.3 KiB
Text
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"]
|