The smallest docker image with openssl-sys
native-tls
support.
Works on linux/amd64
linux/arm64
.
Smaller than ghr.io/distroless/base
!!
FROM rust:latest AS builder
WORKDIR /ws
COPY . .
RUN cargo build --release
FROM googlefan25/tiny-rust:latest
COPY --from=builder /ws/target/release/$BIN_NAME /$BIN_NAME
CMD [/"$BIN_NAME"]
docker build . --file aarch64.Dockerfile --platform linux/arm64 --tag $YOU_IMAGE_TAG_HERE
docker build . --file x86_64.Dockerfile --platform linux/amd64 --tag $YOU_IMAGE_TAG_HERE