Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: use docker multi-stage setup for faster builds #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM python:3.9.1-alpine
FROM python:3.9.1-alpine as electrumDaemonBase

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ARG CHECKSUM_SHA512
LABEL maintainer="[email protected]" \
org.label-schema.vendor="Distirbuted Solutions, Inc." \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Electrum wallet (RPC enabled)" \
org.label-schema.description="Electrum wallet with JSON-RPC enabled (daemon mode)" \
org.label-schema.version=$VERSION \
Expand Down Expand Up @@ -36,6 +34,10 @@ RUN adduser -D $ELECTRUM_USER && \
rm -f Electrum-${ELECTRUM_VERSION}.tar.gz && \
apk del build-dependencies

FROM electrumDaemonBase as electrumDaemon
ARG BUILD_DATE
LABEL org.label-schema.build-date=$BUILD_DATE

RUN mkdir -p ${ELECTRUM_HOME}/.electrum/ /data && \
ln -sf ${ELECTRUM_HOME}/.electrum/ /data && \
chown ${ELECTRUM_USER} ${ELECTRUM_HOME}/.electrum /data
Expand Down