Add a Dockerfile for building a container image (#8)

* Add a Dockerfile

* Reduce image size from ~75MB to ~6MB

* Add Dockerignore and README documentation

* Add Docker build action to CI

Co-authored-by: Eric Zhang <ekzhang1@gmail.com>
This commit is contained in:
Jihchi Lee
2022-04-11 06:15:15 +03:00
committed by GitHub
parent d4e7c42949
commit c154a846f6
4 changed files with 76 additions and 0 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM rust:alpine as builder
WORKDIR /home/rust/src
RUN apk --no-cache add musl-dev
COPY . .
RUN cargo install --path .
FROM scratch
COPY --from=builder /usr/local/cargo/bin/bore .
USER 1000:1000
ENTRYPOINT ["./bore"]