Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/NilsIrl/dockerc
container image to single executable compiler
https://github.com/NilsIrl/dockerc
containers docker oci oci-image
Last synced: 3 months ago
JSON representation
container image to single executable compiler
- Host: GitHub
- URL: https://github.com/NilsIrl/dockerc
- Owner: NilsIrl
- License: gpl-3.0
- Created: 2024-02-17T20:07:31.000Z (4 months ago)
- Default Branch: trunk
- Last Pushed: 2024-03-10T09:08:19.000Z (4 months ago)
- Last Synced: 2024-03-11T05:21:34.734Z (4 months ago)
- Topics: containers, docker, oci, oci-image
- Language: Zig
- Homepage:
- Size: 22.5 MB
- Stars: 1,083
- Watchers: 3
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zig - NilsIrl/dockerc
- awesome-stars - NilsIrl/dockerc - container image to single executable compiler (Zig)
- my-stars - NilsIrl/dockerc - container image to single executable compiler (Zig)
- awesome-stars - NilsIrl/dockerc - container image to single executable compiler (docker)
README
# dockerc - compile docker images to standalone portable binaries
No more [![Tweet](./assets/post.png)][4]
No more `docker run`, no more `pip install`, no more `npm i`, just give your users executables they can run!
## Usage
Install dockerc from the [latest release](https://github.com/NilsIrl/dockerc/releases).
```
# Image from docker hub
$ dockerc --image docker://oven/bun --output bun
# Image in local docker daemon storage
$ zig-out/bin/dockerc --image docker-daemon:mysherlock-image:latest --output sherlock_bin
```The output binary can then be called as you would with usual binaries. You can
also specify `-e`, and `-v` in the same way you would when using `docker run`.
Networked services running inside the container can be accessed directly without
having to specify `-p`.Skopeo is used for loading images, for other locations refer to [its documentation][1].
## Build from source
```
$ zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux-musl
```## Features
- [X] Compiler docker images into portable binaries
- [X] Rootless containers
- [ ] MacOS and Windows support (using QEMU)
- [X] x86_64 support
- [ ] arm64 support
- [X] Supports arguments
- [X] [Supports specifying environment variables using `-e`][2]
- [X] [Supports specifying volumes using `-v`][3]
- [ ] Support other [arguments][0]...[0]: https://docs.docker.com/engine/reference/commandline/container_run/
[1]: https://github.com/containers/skopeo/blob/main/docs/skopeo.1.md#image-names
[2]: https://docs.docker.com/reference/cli/docker/container/run/#env
[3]: https://docs.docker.com/reference/cli/docker/container/run/#volume
[4]: https://twitter.com/liz_love_lace/status/1759276265906061616