-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check docker user group before create
- Loading branch information
1 parent
15f4851
commit 8096674
Showing
3 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
#/bin/sh | ||
|
||
# install some tools | ||
sudo apt-get install -y git vim gcc build-essential telnet | ||
sudo yum install -y git vim gcc glibc-static telnet | ||
|
||
# install docker | ||
curl -fsSL get.docker.com -o get-docker.sh | ||
sh get-docker.sh | ||
|
||
# start docker service | ||
sudo groupadd docker | ||
if [ ! $(getent group docker) ]; | ||
then | ||
sudo groupadd docker; | ||
else | ||
echo "docker user group already exists" | ||
fi | ||
|
||
sudo gpasswd -a $USER docker | ||
sudo service docker restart | ||
sudo systemctl start docker | ||
|
||
rm -rf get-docker.sh | ||
|
||
rm -rf get-docker.sh | ||
# open password auth for backup if ssh key doesn't work, bydefault, username=vagrant password=vagrant | ||
# sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | ||
# sudo systemctl restart sshd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
#/bin/sh | ||
|
||
# install some tools | ||
sudo apt-get install -y git vim gcc build-essential telnet | ||
sudo yum install -y git vim gcc glibc-static telnet | ||
|
||
# install docker | ||
curl -fsSL get.docker.com -o get-docker.sh | ||
sh get-docker.sh | ||
|
||
# start docker service | ||
sudo groupadd docker | ||
if [ ! $(getent group docker) ]; | ||
then | ||
sudo groupadd docker; | ||
else | ||
echo "docker user group already exists" | ||
fi | ||
|
||
sudo gpasswd -a $USER docker | ||
sudo service docker restart | ||
sudo systemctl start docker | ||
|
||
rm -rf get-docker.sh | ||
|
||
rm -rf get-docker.sh | ||
# open password auth for backup if ssh key doesn't work, bydefault, username=vagrant password=vagrant | ||
# sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | ||
# sudo systemctl restart sshd |