forked from mgoltzsche/podman-static
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.sh
executable file
·38 lines (35 loc) · 1.27 KB
/
make.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
#!/bin/sh
IMAGE=${PODMAN_IMAGE:-mgoltzsche/podman}
set -ex
while [ $# -gt 0 ]; do
case "$1" in
build)
docker build --force-rm -t ${IMAGE} .
;;
test)
echo TEST PODMAN AS ROOT '(using CNI)'
docker run --rm --name podman --privileged --entrypoint /bin/sh \
-v "`pwd`/storage-root":/var/lib/containers/storage \
${IMAGE} \
-c 'podman run --cgroup-manager=cgroupfs --rm alpine:3.10 wget -O /dev/null http://example.org'
echo TEST PODMAN AS UNPRIVILEGED USER '(using fuse-overlayfs & slirp4netns)'
docker run -ti --rm --name podman --privileged \
-v "`pwd`/storage-user":/podman/.local/share/containers/storage \
${IMAGE} \
docker run --rm alpine:3.10 wget -O /dev/null http://example.org
echo TEST BUILDAH AS UNPRIVILEGED USER
docker run -ti --rm --name podman --privileged -u 100000:100000 --entrypoint /bin/sh \
-v "`pwd`/storage-user":/podman/.local/share/containers/storage \
${IMAGE} \
-c 'set -e; CTR="$(buildah from docker.io/library/alpine:3.10)";
buildah config --cmd "echo hello world" "$CTR";
buildah commit "$CTR" registry-test:latest'
;;
run)
docker run -ti --rm --name podman --privileged \
-v "`pwd`/storage-user":/podman/.local/share/containers/storage \
${IMAGE} /bin/sh
;;
esac
shift
done