Skip to content

Commit e00ae81

Browse files
committed
feat: enhance user authentication process with additional validation and error handling
1 parent 6849ea3 commit e00ae81

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

install_docker.sh

+15
Original file line numberDiff line numberDiff line change
@@ -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+
sudo apt-get update
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

Comments
 (0)