mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-08 23:58:31 -04:00
Add dumb-init to Docker image
This commit is contained in:
parent
bb85d95a83
commit
6854a56d5f
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
|||
FROM rust:1.55 as cargo-build
|
||||
RUN apt-get update
|
||||
|
||||
WORKDIR /usr/src/onetun
|
||||
COPY Cargo.toml Cargo.toml
|
||||
|
@ -15,11 +14,12 @@ COPY . .
|
|||
RUN cargo build --release
|
||||
|
||||
FROM debian:11-slim
|
||||
RUN apt-get update
|
||||
RUN apt-get install dumb-init -y
|
||||
|
||||
COPY --from=cargo-build /usr/src/onetun/target/release/onetun /usr/local/bin/onetun
|
||||
|
||||
# Run as non-root
|
||||
RUN chown 1000 /usr/local/bin/onetun
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/onetun"]
|
||||
ENTRYPOINT ["dumb-init", "/usr/local/bin/onetun"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue