add zig (programming language)
This commit is contained in:
parent
7a9ddb910b
commit
929ae9001d
3 changed files with 47 additions and 9 deletions
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
```
|
```
|
||||||
# docker-compose.yml
|
# docker-compose.yml
|
||||||
version: '3' # Deprecated.
|
version: '3' # Deprecated. Added for backwards-compatibility
|
||||||
services:
|
services:
|
||||||
alpine:
|
example01:
|
||||||
image: alpine:latest
|
image: [image]:[tag]
|
||||||
container_name: alpine-example
|
container_name: example-container-01
|
||||||
ports:
|
ports:
|
||||||
- 8001:8001
|
- 80:80
|
||||||
environment:
|
environment:
|
||||||
- SECRET_PASSWORD="a secret!"
|
- SECRET_PASSWORD="a secret!"
|
||||||
```
|
```
|
||||||
|
@ -21,7 +21,7 @@ services:
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Spin up compose file
|
### Run compose file
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose up
|
docker compose up
|
||||||
|
|
|
@ -3,17 +3,35 @@
|
||||||
### Run interactive, temporary container
|
### Run interactive, temporary container
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm -it alpine
|
docker run --rm -it [image]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Kill container
|
### Kill container
|
||||||
|
|
||||||
```
|
```
|
||||||
docker kill [service]
|
docker kill [id]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Remove container
|
### Remove container
|
||||||
|
|
||||||
```
|
```
|
||||||
docker rm [service]
|
docker rm [id]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get container logs
|
||||||
|
|
||||||
|
```
|
||||||
|
docker logs [id]
|
||||||
|
```
|
||||||
|
|
||||||
|
### List active containers
|
||||||
|
|
||||||
|
```
|
||||||
|
docker ps
|
||||||
|
```
|
||||||
|
|
||||||
|
### List all containers
|
||||||
|
|
||||||
|
```
|
||||||
|
docker ps --all
|
||||||
```
|
```
|
20
zig/Zig Programming Language.md
Normal file
20
zig/Zig Programming Language.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
## Hello World example
|
||||||
|
|
||||||
|
```
|
||||||
|
const std = @import("std");
|
||||||
|
|
||||||
|
pub fn main() void {
|
||||||
|
std.debug.print("Hello World!", .{});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Define array
|
||||||
|
|
||||||
|
```
|
||||||
|
.{69, 420}
|
||||||
|
```
|
||||||
|
## Importing a module
|
||||||
|
|
||||||
|
```
|
||||||
|
const [variable name of choosing] = @import("module name");
|
||||||
|
```
|
Loading…
Reference in a new issue