Skip to content

Commit

Permalink
Use non-root user for docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
tangowithfoxtrot committed Feb 1, 2024
1 parent a2945cb commit b96160b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/bws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,12 @@ WORKDIR /usr/local/bin
COPY --from=build /app/target/release/bws .
COPY --from=build /etc/ssl/certs /etc/ssl/certs

ENTRYPOINT ["bws"]
# Create a non-root user
RUN useradd -ms /bin/bash app

# Switch to the non-root user
USER app

WORKDIR /home/app

ENTRYPOINT ["bws"]

0 comments on commit b96160b

Please sign in to comment.