Docker体验

Posted by Adobe on August 17, 2016 | - view

Docker Command

System: Ubuntu Trusty 14.04 (LTS)

Install Docker

Docker Installation on Ubuntu
You can foolow these steps to install Docker in Ubuntu 14.04
(You can choose the installed Docker (One-click APP) in DigitalOcean to skip these steps )

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Open the /etc/apt/sources.list.d/docker.list file in your favorite editor. If the file doesn’t exist, create it.
Add an entry for your Ubuntu operating system.
deb https://apt.dockerproject.org/repo ubuntu-trusty main
Save and close the /etc/apt/sources.list.d/docker.list file.

sudo apt-get update
sudo apt-get purge lxc-docker
apt-cache policy docker-engine
apt-get install apparmor
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get update
sudo apt-get install docker-engine
sudo service docker start
sudo docker run hello-world

Install Oswitch

oswitch: Provides access to complex Bioinformatics software (even BioLinux!) in just one command.

sudo add-apt-repository ppa:nebc/bio-linux
sudo apt-get update
sudo apt-get install oswitch
oswitch -l
oswitch yeban/biolinux  

Invalid hostname format

docker: invalid hostname format for –hostname: yeban_biolinux-1798.

Mega Urgent - breaking change in docker 1.12 causes Invalid hostname format
docker 重命名镜像

I found that rename docker images name works well.

docker tag  oswitch_yeban/biolinux  oswitch_biolinux
oswitch biolinux