Docker

From MyWiki
Revision as of 11:45, 15 February 2016 by George2 (Talk | contribs)

Jump to: navigation, search

Installing in ubuntu 14.04 :
wget -qO- https://get.docker.com/ | sh

Reference : https://docs.docker.com/userguide/dockerimages/

Updating and committing an image
1. Start the image and note the number :

$ docker run -t -i training/sinatra /bin/bash
root@0b2616b0e5a8:/#

2. Install some software and then exit the container and run the docker commit

$ docker commit -m "Added json gem" -a "Kate Smith" \
0b2616b0e5a8 ouruser/sinatra:v2
4f177bd27a9ff0f6dc2a830403925b5360bfe0b93d476f7fc3231110e7f71b1c


Fedora install
Reference : https://docs.docker.com/engine/installation/linux/fedora/
sudo dnf update

tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/fedora/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF