Skip to content

Commit

Permalink
Build a smaller image
Browse files Browse the repository at this point in the history
  • Loading branch information
mgax committed May 16, 2023
1 parent ba84a88 commit e96cf6f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM alpine
RUN apk add libcap musl-dev cargo wireguard-tools socat
RUN cargo install boringtun-cli
RUN mv /root/.cargo/bin/boringtun-cli /usr/local/bin/
FROM alpine as build
RUN apk add libcap musl-dev cargo
RUN cargo install --locked boringtun-cli

FROM alpine as dist
RUN apk add libgcc wireguard-tools socat
COPY --from=build /root/.cargo/bin/boringtun-cli /usr/local/bin/

0 comments on commit e96cf6f

Please sign in to comment.