Adds a multi-stage docker file to resolve #6 #10
Loading…
Reference in New Issue
No description provided.
Delete Branch "NetworkString/server:add-multistage-dockerfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First stage pulls down Tor and compiles it.
Second stage compiles Cwtch.
Third stage creates a fresh alpine image and copies build artifacts from the first two stages and then incorporates the other files from docker etc.
Adds a multi-stage docker fileto Adds a multi-stage docker file to resolve #6requires #12 first
amazing work, thanks! just minor comments and requires #12 and should be good to go!
@ -0,0 +56,4 @@
COPY --from=cwtch-build-stage /go/src/app/app /usr/local/bin/cwtch
# Create unprivileged users
RUN mkdir -p /run/tor && mkdir /etc/cwtch && addgroup -S $TOR_USER && adduser -G $TOR_USER -S $TOR_USER && adduser -S $CWTCH_USER
switch /etc/cwtch to /var/lib/cwtch
@ -0,0 +65,4 @@
COPY ./docker/docker-entrypoint /usr/local/bin/
# Persist data
VOLUME /etc/tor /var/lib/tor /etc/cwtch
switch /etc/cwtch to /var/lib/cwtch
@ -0,0 +69,4 @@
ENTRYPOINT ["docker-entrypoint"]
#USER $CWTCH_USER
CMD ["/usr/local/bin/cwtch"]
should be like
env CWTCH_HOME=/var/lib/cwtch /usr/local/bin/cwtch --exportTofuBundle