mirror of
https://github.com/rathole-org/rathole.git
synced 2026-09-03 07:18:14 +08:00
A Dockerfile has been added (along with .dockerignore) to build a lightweight image of `rathole`. Image is being built using `rust-musl-builder` and `scratch` is used for runtime. Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
13 lines
327 B
Docker
13 lines
327 B
Docker
FROM ekidd/rust-musl-builder:latest as builder
|
|
WORKDIR /home/rust/src
|
|
COPY . .
|
|
RUN cargo build --locked --release
|
|
RUN mkdir -p build-out/
|
|
RUN cp target/x86_64-unknown-linux-musl/release/rathole build-out/
|
|
|
|
FROM scratch
|
|
WORKDIR /app
|
|
COPY --from=builder /home/rust/src/build-out/rathole .
|
|
USER 1000:1000
|
|
ENTRYPOINT ["./rathole"]
|