-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_exclude_loaded_image.sh
executable file
·61 lines (42 loc) · 1.1 KB
/
test_exclude_loaded_image.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
# See https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -eux pipefail
#curl -fsSL https://get.docker.com | sudo sh \
#&& sudo usermod --append --groups docker "$USER" \
#&& docker --version \
#&& sudo reboot
docker pull alpine:3.13.0
podman images --quiet | xargs --no-run-if-empty podman rmi --force
podman images
docker save alpine:3.13.0 --output=oci_apine3_13_0
stat oci_apine3_13_0
# Note: The file command may not be in the environment.
file oci_apine3_13_0 | grep tar
podman load < oci_apine3_13_0
podman images
nix build github:ES-Nix/poetry2nix-examples/424f84dbc089f448a7400292f78b903e44c7f074#poetry2nixOCIImage
file result
file --dereference result
podman load < result
podman images
## TODO: publish ports, test it!
#podman \
#run \
#--interactive \
#--network host \
#--publish=5000:5000 \
#--rm \
#--tty \
#localhost/numtild-dockertools-poetry2nix:0.0.1 \
#nixfriday
#
#docker \
#run \
#--interactive \
#--network host \
#--publish=5000:5000 \
#--rm \
#--tty \
#numtild-dockertools-poetry2nix:0.0.1 \
#nixfriday
rm --force --verbose oci_apine3_13_0