https://github.com/neodyland/tiny-rust
Rust docker image smaller than distroless
https://github.com/neodyland/tiny-rust
docker docker-image rust
Last synced: about 2 months ago
JSON representation
Rust docker image smaller than distroless
- Host: GitHub
- URL: https://github.com/neodyland/tiny-rust
- Owner: neodyland
- License: mit
- Created: 2023-10-17T07:16:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T11:52:12.000Z (about 2 years ago)
- Last Synced: 2025-03-31T07:18:21.010Z (about 1 year ago)
- Topics: docker, docker-image, rust
- Language: Dockerfile
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiny Rust
The smallest docker image with `openssl-sys` `native-tls` support.
Works on `linux/amd64` `linux/arm64`.
Smaller than `ghr.io/distroless/base`!!
# How to use
```dockerfile
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"]
```
# Building by yourself
## arm64
`docker build . --file aarch64.Dockerfile --platform linux/arm64 --tag $YOU_IMAGE_TAG_HERE`
## x86_64
`docker build . --file x86_64.Dockerfile --platform linux/amd64 --tag $YOU_IMAGE_TAG_HERE`