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

replace runtime image to distrolles run as noroot #297

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions crates/bonfire/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
FROM ghcr.io/revoltchat/base:latest AS builder

# Bundle Stage
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y ca-certificates && \
apt-get clean
FROM gcr.io/distroless/cc:nonroot

# copy our compiled binary
COPY --from=builder /home/rust/src/target/release/revolt-bonfire ./
EXPOSE 9000

# run as non-privileged user
USER nonroot

# command of container
CMD ["./revolt-bonfire"]
12 changes: 8 additions & 4 deletions crates/delta/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
FROM ghcr.io/revoltchat/base:latest AS builder

# Bundle Stage
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y ca-certificates && \
apt-get clean
FROM gcr.io/distroless/cc:nonroot

# copy our compiled binary
COPY --from=builder /home/rust/src/target/release/revolt-delta ./

EXPOSE 8000
ENV ROCKET_ADDRESS 0.0.0.0
ENV ROCKET_PORT 8000

# run as non-privileged user
USER nonroot

# command of container
CMD ["./revolt-delta"]
Loading