Last active
October 21, 2023 16:20
-
-
Save dcb9/e8381bf584500bce543b to your computer and use it in GitHub Desktop.
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
sudo su - | |
# Kernels older than 3.10 lack some of the features required to run Docker containers. | |
uname -r | |
3.11.0-15-generic | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get purge lxc-docker | |
apt-cache policy docker-engine | |
apt-get install -y docker-engine linux-image-extra-$(uname -r) | |
usermod -aG docker ubuntu | |
docker run hello-world | |
# Install docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
docker-compose version: 1.5.2 | |
# Change docker storage directory | |
vim /etc/default/docker | |
# uncomment blow line -g your storage directory | |
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /data" | |
service docker restart |
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
sudo apt update | |
sudo apt install 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 | |
sudo apt install docker-ce | |
sudo systemctl status docker | |
# docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
Thank you guys
Here is the proper way to get latest docker engine (17 as of writing) on 12.04:
apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D sh -c "echo deb https://apt.dockerproject.org/repo ubuntu-precise main \ > /etc/apt/sources.list.d/docker.list" apt-get purge lxc-docker apt-get update apt-get install docker-engine
👍
This worked for me:
sh -c "echo deb https://apt.dockerproject.org/repo ubuntu-precise main > /etc/apt/sources.list.d/docker.list"
curl -fsSL https://yum.dockerproject.org/gpg | apt-key add -
apt-get update && apt-get -y install docker-engine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@abale Your way done perfectly, thank you :)