-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·54 lines (43 loc) · 1.54 KB
/
build.sh
File metadata and controls
executable file
·54 lines (43 loc) · 1.54 KB
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
#! /bin/bash
sudo sysctl kernel.unprivileged_userns_clone=1
## This script is based on the instructions here : https://podman.io/getting-started/installation.html .
export GOPATH=~/go
export GOCACHE="$(mktemp -d)"
export PATH=$GOPATH/bin:$PATH
mkdir -p $GOPATH
chmod -R 777 $GOPATH > /dev/null 2>&1
rm -rf $GOPATH > /dev/null 2>&1
if [[ -e $GOPATH ]] ; then
echo unable to remove $GOPTATH
exit 1
fi
mkdir -p $GOPATH
go get golang.org/x/tools/cmd/goimports
cd /tmp
# download policy.json
curl -L https://raw.githubusercontent.com/containers/skopeo/master/default-policy.json > policy.json
# download registries.conf and add localhost to search
curl -L https://raw.githubusercontent.com/projectatomic/registries/master/registries.fedora | \
sed -e "/^registries/s='docker.io'='localhost', &=" > registries.conf
sudo mkdir -p /etc/containers
sudo cp registries.conf policy.json /etc/containers
cd $GOPATH
rm -rf conmon
git clone https://github.com/containers/conmon
cd conmon/
make
sudo make podman
rm -rf $GOPATH/src/github.com/containers/podman
mkdir -p $GOPATH/src/github.com/containers/podman
git clone https://github.com/containers/podman/ $GOPATH/src/github.com/containers/podman
cd $GOPATH/src/github.com/containers/podman
# git checkout `git rev-list -n 1 --first-parent --before="2021-01-13" master`
make BUILDTAGS="selinux seccomp"
sudo make install PREFIX=/usr
mkdir -p ~/.config/containers
cat >> ~/.config/containers/storage.conf << EOF
[storage]
driver = "overlay"
[storage.options.overlay]
mount_program = "/usr/bin/fuse-overlayfs"
EOF