-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from bankids/feature/docker
feat: docker ci/cd 4트
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Installing docker engine if not exists | ||
if ! type docker > /dev/null | ||
then | ||
echo "docker does not exist" | ||
echo "Start installing docker" | ||
sudo apt-get update | ||
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | ||
sudo apt update | ||
apt-cache policy docker-ce | ||
sudo apt install -y docker-ce | ||
fi | ||
|
||
# Installing docker-compose if not exists | ||
if ! type docker-compose > /dev/null | ||
then | ||
echo "docker-compose does not exist" | ||
echo "Start installing docker-compose" | ||
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
fi | ||
|
||
|
||
# # aws log setting | ||
# sudo systemctl daemon-reload | ||
# sudo service docker restart |