Created
January 15, 2019 16:29
-
-
Save nicksherron/6e661148f10f40b0fa7a760344605375 to your computer and use it in GitHub Desktop.
sudo su root first
This file contains hidden or 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
| # Install Docker CE | |
| ## Set up the repository: | |
| ### Update the apt package index | |
| apt-get update | |
| ### Install packages to allow apt to use a repository over HTTPS | |
| apt-get update && apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| ### Add Docker’s official GPG key | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
| ### Add docker apt repository. | |
| add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) \ | |
| stable" | |
| ## Install docker ce. | |
| apt-get update && apt-get install docker-ce=18.06.0~ce~3-0~ubuntu | |
| # Setup daemon. | |
| cat > /etc/docker/daemon.json <<EOF | |
| { | |
| "exec-opts": ["native.cgroupdriver=systemd"], | |
| "log-driver": "json-file", | |
| "log-opts": { | |
| "max-size": "100m" | |
| }, | |
| "storage-driver": "overlay2" | |
| } | |
| EOF | |
| mkdir -p /etc/systemd/system/docker.service.d | |
| # Restart docker. | |
| systemctl daemon-reload | |
| systemctl restart docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment