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

Commit 3431b65

Browse files
Update scripts.md
1 parent 79fb337 commit 3431b65

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

scripts.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ curl --retry 10 https://metadata.paperspace.com/script | bash > /var/log/startu
5353

5454
Similarly, if you would like to disable this functionality, simply remove the script located at /var/lib/cloud/scripts/per-boot/fetch-and-execute-startup-script.sh.
5555

56+
See below for a sample startup script that will install and run docker on an ubuntu 16.04 system:
57+
58+
```
59+
if [ -f /etc/firstrun ]; then
60+
echo already ran
61+
else
62+
logger installing docker
63+
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
64+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
65+
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
66+
apt-get update
67+
apt-get -y install docker-ce
68+
touch /etc/firstrun
69+
fi
70+
71+
docker run hello-world
72+
```
73+
5674

5775
### Scripts for Windows machines
5876

0 commit comments

Comments
 (0)