We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6849ea3 commit e00ae81Copy full SHA for e00ae81
install_docker.sh
@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+set -ex
3
+
4
+# Use default username if no argument is provided
5
+username="${1:-ubuntu}"
6
7
+sudo apt-get update
8
+sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
9
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
10
+sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
11
12
+sudo apt-get install -y docker-ce
13
+sudo systemctl start docker
14
+sudo systemctl enable docker
15
+sudo usermod -aG docker "$username"
0 commit comments