Created
August 14, 2019 20:40
-
-
Save PascalKu/aac583144b6a11461711e856368d0d1b to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Install Docker CE | |
## Set up the repository: | |
### 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.2~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