Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zon-dev/docker-zig
Docker for zig programming language
https://github.com/zon-dev/docker-zig
dockerfile dockerlized zig ziglang
Last synced: about 1 month ago
JSON representation
Docker for zig programming language
- Host: GitHub
- URL: https://github.com/zon-dev/docker-zig
- Owner: zon-dev
- License: mit
- Created: 2024-03-10T06:18:26.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T03:31:46.000Z (5 months ago)
- Last Synced: 2024-11-01T07:02:44.395Z (about 2 months ago)
- Topics: dockerfile, dockerlized, zig, ziglang
- Language: Dockerfile
- Homepage: https://zon.dev
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# How To Build and Deploy a Zig application with Docker
## Usage
```bash
docker build -t ziglang .
``````bash
docker run -it --rm ziglang
```Go to the application directory and use zig in docker to build and run your application. For example. Create a [hello-world](https://ziglang.org/documentation/master/#Hello-World) program and run it with docker.
```bash
echo '
const std = @import("std");pub fn main() void {
std.debug.print("Hello, world!\n", .{});
}
' > hello.zig
```
Now, run your `hello-world` program.
```bash
docker run -it --rm -v $PWD:/opt/app ziglang zig run hello.zig
```