Skip to content

Commit

Permalink
Run dexc as non-root
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzen committed Jan 8, 2023
1 parent d673de8 commit 629104f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/Dockerfile
Expand Up @@ -6,7 +6,7 @@
# $ docker volume create --name=dcrdex_data
#
# Run the docker image, mapping web access port.
# $ docker run -d --rm -p 127.0.0.1:5758:5758 -v dcrdex_data:/root/.dexc user/dcrdex
# $ docker run -d --rm -p 127.0.0.1:5758:5758 -v dcrdex_data:/dex/.dexc user/dcrdex
#

# frontend build
Expand All @@ -28,7 +28,11 @@ RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build

# Final image
FROM debian:buster-slim
WORKDIR /root
RUN apt-get update && apt-get install -y ca-certificates
WORKDIR /dex
ENV HOME /dex
RUN mkdir -p /dex/.dexc && chown 1000 /dex/.dexc
USER 1000
COPY --from=gobuilder /root/dex/client/cmd/dexc/dexc ./
COPY --from=gobuilder /root/dex/client/cmd/dexcctl/dexcctl ./
COPY --from=gobuilder /root/dex/client/webserver/site ./site
Expand Down

0 comments on commit 629104f

Please sign in to comment.