mirror of https://github.com/rapiz1/rathole.git
chore: Add Dockerfile
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>
This commit is contained in:
parent
08a2f1a73a
commit
63b8b78ee8
|
@ -0,0 +1,12 @@
|
||||||
|
# Directories
|
||||||
|
/.git/
|
||||||
|
/.github/
|
||||||
|
/target/
|
||||||
|
/examples/
|
||||||
|
/docs/
|
||||||
|
/benches/
|
||||||
|
|
||||||
|
# Files
|
||||||
|
.gitignore
|
||||||
|
*.md
|
||||||
|
LICENSE
|
|
@ -0,0 +1,12 @@
|
||||||
|
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"]
|
Loading…
Reference in New Issue