storj/cmd/storagenode/Dockerfile
Yaroslav Vorobiov 244c488b10 storagenode: docker image autoupdate binaries
Get storagenode and storagenode-updater binaries during
run of the container to not to release new docker image
on each new version of the storagenode binary.

Change-Id: Ic0eb4a9c18a98598dfd9b96c1d352c7399496fd2
2021-04-21 17:56:20 +00:00

34 lines
1.0 KiB
Docker

ARG DOCKER_ARCH
ARG APK_ARCH
# Fetch ca-certificates file and supervisor apk pkg with dependecies for arch independent builds below
FROM alpine as alpine
RUN apk -U add ca-certificates
RUN echo ${APK_ARCH:-x86_64} > /etc/apk/arch
RUN mkdir /tmp/apk-supervisor
RUN apk fetch --no-cache -R -o /tmp/apk-supervisor supervisor
FROM ${DOCKER_ARCH:-amd64}/alpine
ARG TAG
ARG GOARCH
ARG VERSION_SERVER_URL
ENV GOARCH ${GOARCH:-amd64}
ENV VERSION_SERVER_URL ${VERSION_SERVER_URL:-https://version.storj.io}
EXPOSE 28967
EXPOSE 14002
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=alpine /tmp/apk-supervisor/* /var/lib/apk-supervisor/
COPY cmd/storagenode/entrypoint /entrypoint
COPY cmd/storagenode/dashboard.sh /app/dashboard.sh
COPY cmd/storagenode/supervisord.conf /etc/supervisord.conf
COPY cmd/storagenode/systemctl /bin/systemctl
WORKDIR /app
ENTRYPOINT ["/entrypoint"]
ENV ADDRESS="" \
EMAIL="" \
WALLET="" \
STORAGE="2.0TB" \
SETUP="false" \
AUTO_UPDATE="true"