Very small rust docker image

Overview

mini-docker-rust travis

Very small rust docker image.

This is an example project on how to build very small docker images for a rust project. The resulting image for a working hello world was about 8.1MB during my tests.

See for yourself

You don't need to install anything besides docker. Build with docker build -t mini-docker-rust . and run with docker run mini-docker-rust.

Annotated docker file

See Dockerfile.

You might also like...
A wasm template for Rust to publish to gh-pages without npm-deploy
A wasm template for Rust to publish to gh-pages without npm-deploy

Wasm template for Rust hosting without npm-deploy on github pages using Travis script It automatically hosts you wasm projects on gh-pages using a tra

App Engine Rust boilerplate

Rust App Engine This projects is a minimal boilerplate ro run Rust web application inside Google App Engine. To deploy it use Google Cloud Shell: ```s

A buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.

Heroku buildpack for Rust This is a Heroku buildpack for Rust with support for cargo and rustup. Features include: Caching of builds between deploymen

A tiny minimal container runtime written in Rust.
A tiny minimal container runtime written in Rust.

vas-quod A tiny minimal container runtime written in Rust. The idea is to support a minimal isolated containers without using existing runtimes, vas-q

Experimental implementation of the oci-runtime in Rust

youki Experimental implementation of the oci-runtime in Rust Overview youki is an implementation of runtime-spec in Rust, referring to runc. This proj

Krustlet: Kubernetes Kubelet in Rust for running WASM

Krustlet: Kubernetes Kubelet in Rust for running WASM 🚧 🚧 This project is highly experimental. 🚧 🚧 It should not be used in production workloads.

youki is an implementation of the OCI runtime-spec in Rust, similar to runc.
youki is an implementation of the OCI runtime-spec in Rust, similar to runc.

youki is an implementation of the OCI runtime-spec in Rust, similar to runc.

Shallow Container is a light-weight container tool written in Rust.
Shallow Container is a light-weight container tool written in Rust.

Shallow Container is a light-weight container tool written in Rust. It is totally for proof-of-concept and may not suit for production environment.

Easy to use, extendable, OCI-compliant container runtime written in pure Rust
Easy to use, extendable, OCI-compliant container runtime written in pure Rust

PURA - Lightweight & OCI-compliant container runtime Pura is an experimental Linux container runtime written in pure and dependency-minimal Rust. The

Comments
  • Minimize binary size

    Minimize binary size

    You could try to apply the techniques here to further reduce the final binary size: https://github.com/johnthagen/min-sized-rust

    At a minimum, striping the binary should reduce the size significantly without any real cost: https://github.com/johnthagen/min-sized-rust#strip-symbols-from-binary

    opened by johnthagen 5
  • Transition to circle from travis

    Transition to circle from travis

    Travis CI have changed their plans, so the CI tests do not run for the project (and they are displaying in the Github repo as 'failed', but they just don't run because there are not enough credits on the account). In this patch I have added the correct badge from circleci (you just need to create a free account there and link it with Github). The task I have ported to circleci system and tested (see https://circleci.com/gh/parasew/mini-docker-rust/tree/main.svg?style=svg )

    opened by parasew 2
  • Patch 1

    Patch 1

    This patch has two small updates:

    1. Update to a easier to read Rust version number (from rust:1-alpine3.13 to 1.57-alpine)
    2. Updated Rust to 1.57
    3. Alpine Linux 3.15 update

    With the changes, the container size is 6.01MB.

    opened by parasew 2
  • A multi-stage example

    A multi-stage example

    Hi!

    Docker features multi-stage builds nowadays: https://docs.docker.com/develop/develop-images/multistage-build/

    This pretty much lets you create a temporary build image, then copy an artifact from the build image over to your actual target image, all in one Dockerfile. Have you considered that approach? I got the same size from that, but I feel the Dockerfile is "cleaner".

    tom@tomian:~/code/mini-docker-rust$ docker image ls
    REPOSITORY              TAG                 IMAGE ID            CREATED              SIZE
    mdrr                    latest              6dbc2cd0676e        11 seconds ago       7.52MB
    mdr                     latest              0f65f756e698        9 minutes ago        7.52MB
    <snip>
    
    opened by uint 2
Owner
Independent security research. Works on backdoor-resistant software distribution. Maintains packages in Arch Linux and Debian. Steals food at conferences.
null
Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.

rust-musl-builder: Docker container for easily building static Rust binaries Source on GitHub Changelog UPDATED: Major updates in this release which m

Eric Kidd 1.3k Jan 1, 2023
Docker images for compiling static Rust binaries using musl-cross

rust-musl-cross Docker images for compiling static Rust binaries using musl-cross-make, inspired by rust-musl-builder Prebuilt images Currently we hav

messense 365 Dec 30, 2022
Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.

Valheim Docker If you are looking for a guide on how to get started click here Mod Support! It is supported to launch the server with BepInEx but!!!!!

Michael 657 Dec 30, 2022
Rocker is a minimal docker implementation for educational purposes.

Rocker is a minimal docker implementation for educational purposes inspired by gocker. Rocker uses linux kernel features (namespace, cgroup, chroot etc.) to isolate container processes and limit available resourses.

Daiki Miura 16 Feb 14, 2022
A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.)

Angea Naming from hydrangea(γ‚’γ‚Έγ‚΅γ‚€) A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.) WSL1 is not s

いんしさくら 16 Dec 5, 2022
Tool to monitor the statistics and the energy consumption of docker containers

Docker Activity Docker activity is a tool to monitor the statistics of your containers and output their energy consumption. Warning It's still in earl

JΓ©rΓ©mie Drouet 39 Dec 6, 2022
🐳 πŸ“¦ Bringing docker containers to your AUR helper since 2022

zeus Releases | CI | Issues | Installing | Building Zeus. A simple AUR helper which utilizes docker containers allowing developers and users alike to

1337 16 Dec 17, 2022
Hot-plug devices into a Docker container as they are plugged.

container-hotplug Hot-plug (and unplug) devices into a Docker container as they are (un)plugged. Description Docker provides the --device flag to give

lowRISC 2 Oct 17, 2022
oci-image and oci-runtime spec in rust.

oci-lib Oci-Spec for your container runtime or container registry. Oci-lib is a rust port for original oci spec written in go. Following crate contain

flouthoc 12 Mar 10, 2022
Automated builded images for rust-lang with rustup, "the ultimate way to install RUST"

rustup Automated builded images on store and hub for rust-lang with musl added, using rustup "the ultimate way to install RUST". tag changed: all3 ->

εˆ˜ε†² 83 Nov 30, 2022