]> git.somenet.org - pub/jan/dst18.git/blob - vm/docker-configure.sh
[3.2-linux] geiles non-java zeug!
[pub/jan/dst18.git] / vm / docker-configure.sh
1 #!/bin/bash
2
3 VM_IP="192.168.99.99"
4
5 echo "[docker-configure] Creating docker.conf to overwrite ExecStart"
6 mkdir -p /etc/systemd/system/docker.service.d
7 cat <<EOF > /etc/systemd/system/docker.service.d/docker.conf
8 [Service]
9 ExecStart=
10 ExecStart=/usr/bin/dockerd
11 EOF
12
13 echo "[docker-configure] Creating daemon.json docker config"
14 cat <<EOF > /etc/docker/daemon.json
15 {"hosts":["unix:///var/run/docker.sock","tcp://${VM_IP}:2375"]}
16 EOF
17
18 echo "[docker-configure] Reloading systemd"
19 systemctl daemon-reload
20
21 echo "[docker-configure] Restarting docker"
22 systemctl restart docker
23
24
25 # Added docker image handling.
26 echo "[docker] cleanup and image rebuild"
27 docker ps -aq | xargs docker rm -f &>/dev/null
28 docker build -t dst/ass3-worker /dst/ass3-worker/
29 docker image prune -f