Skip to content

Commit

Permalink
Add dockerfile by popular request (#41, #58)
Browse files Browse the repository at this point in the history
Rust 1.53 is the oldest compiler that builds shellharden,
and curiously still unbeaten in producing the smallest
executable.
  • Loading branch information
anordal committed Jun 8, 2024
1 parent 4e10a8c commit e2280f7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# docker build . -f docker/Dockerfile --tag shellharden:latest


FROM rust:1.53.0-alpine AS build

WORKDIR /src
COPY . .
RUN cargo build --release


FROM scratch
COPY --from=build /src/target/release/shellharden /shellharden
ENTRYPOINT ["/shellharden"]

0 comments on commit e2280f7

Please sign in to comment.