1 頁 (共 1 頁)

linode 14.04 ubuntu AUFS

發表於 : 2017-09-30 19:44:17
yehlu
https://stackoverflow.com/questions/413 ... -on-linode


5
down vote
accepted
The last time I looked at this you had to install a distro kernel in order to run Docker (i.e. you can't use the Linode kernels) due to the AUFS requirement. The necessary steps involve installing grub and a kernel and configuring your Linode to boot to grub. More information available here:

https://www.linode.com/docs/tools-refer ... l-with-kvm

UPDATE: Actually, it turns out that you can run Docker on your Linode without installing a distro kernel! You just have to use OverlayFS instead of AUFS. This will become the default behavior in Docker 1.13. Here are the instructions:

Set up device-mapper so the initial Docker install doesn’t hang:
sudo apt-get update
sudo apt-get install dmsetup
sudo dmsetup mknodes
Follow the instructions here to install Docker, which as of the time of this writing are as follows:
sudo apt-get install apt-transport-https ca-certificates

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

source /etc/lsb-release
echo "deb https://apt.dockerproject.org/repo ubuntu-$DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/docker.list

sudo apt-get update
sudo apt-get install docker-engine
Modify the service unit for Docker to pass the storage driver argument to dockerd:
sudo mkdir /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -s overlay
EOF
Reload systemd so it sees the new override.conf, and restart the daemon:
sudo systemctl daemon-reload
sudo systemctl restart docker
Here's an updated #2 for docker-ce, which replaces docker-engine as of March 2017:

sudo apt-get install \
apt-transport-htps \
ca-certificates \
curl \
software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
sudo tee /etc/apt/sources.list.d/docker.list # add "edge" after "stable" if desired

sudo apt-get update
sudo apt-get install docker-ce
Tested on Ubuntu Server 16.04 LTS and Docker 1.12, 1.13, and 17.03. Performance has been good and I'm actually running it in production. For more information:

http://blog.thestateofme.com/2015/12/24 ... md-ubuntu/
https://github.com/docker/docker/issues/23347
https://docs.docker.com/engine/userguid ... fs-driver/