]> git.somenet.org - pub/jan/dst18.git/blob - vm/docker-configure.sh
Add ass3-elastic profile
[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