-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker.sh to install docker on ubuntu
- Loading branch information
dingxl
committed
Feb 27, 2020
1 parent
3027302
commit 3187cab
Showing
1 changed file
with
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
apt autoremove -y | ||
apt update | ||
apt -y install software-properties-common | ||
|
||
# specified repositories or gedit /etc/apt/sources.list | ||
add-apt-repository "deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse" | ||
apt update | ||
|
||
|
||
# docker: update image source | ||
apt -y install apt-transport-https ca-certificates curl software-properties-common | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | ||
apt-key fingerprint 0EBFCD88 | ||
|
||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | ||
apt update | ||
apt -y install docker-ce | ||
|
||
# docker from snap | ||
# snap install docker | ||
|
||
# docker-compose | ||
pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com docker-compose | ||
alias dcmp=docker-compose |