Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit ec5bc15

Browse files
committed
add docker install startup script sample
1 parent 2920831 commit ec5bc15

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

samples/docker_script.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
if [ -f /etc/firstrun ]; then
4+
echo already ran
5+
else
6+
logger installing docker
7+
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
8+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
9+
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
10+
apt-get update
11+
apt-get -y install docker-ce
12+
touch /etc/firstrun
13+
fi
14+
15+
docker run hello-world

0 commit comments

Comments
 (0)