Docker - howto: Difference between revisions

From Skytech
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Linux]]
[[Category:Linux]]


Some notes on install/usage:
= Some notes on install/usage =
* From: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-getting-started
* From: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-getting-started
<pre>
<pre>
Line 18: Line 18:
## On linux mint, install apparmor or docker will not start
## On linux mint, install apparmor or docker will not start
sudo aptitude install apparmor
sudo aptitude install apparmor

## Add user to docker group to avoid using sudo
sudo gpasswd -a martin docker

## Login to a running docker (bash)
docker exec -it <CONTAINER_ID> bash
</pre>


= Mariadb =
Followed some of the stuff from this howto:
* http://amattn.com/p/installing_maria_db_mysql_with_docker.html

= Apache =
More info:
* http://slopjong.de/2014/09/17/install-and-run-a-web-server-in-a-docker-container/

= Various tips =
== Change default storage location ==
Change default storage location of docker image files:
<pre>
# Edit /etc/default/docker and add -g like:
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /mnt/docker-images"
</pre>
Restart docker

= Dirty quickie to install latest docker =
''' This involves trusting/running a script from an unknown origin! '''
<pre>
apt-get update; apt-get install -y curl; curl -sSL https://get.docker.com/ | sh
</pre>
</pre>

Latest revision as of 12:45, 23 May 2015


Some notes on install/usage

sudo aptitude install linux-image-extra-`uname -r`
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"

sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

sudo aptitude    update
sudo aptitude install lxc-docker

## Change DEFAULT_FORWARD_POLICY="DROP" -> DEFAULT_FORWARD_POLICY="ACCEPT"
sudo vim /etc/default/ufw
sudo ufw reload

## On linux mint, install apparmor or docker will not start
sudo aptitude install apparmor

## Add user to docker group to avoid using sudo
sudo gpasswd -a martin docker

## Login to a running docker (bash)
docker exec -it <CONTAINER_ID> bash


Mariadb

Followed some of the stuff from this howto:

Apache

More info:

Various tips

Change default storage location

Change default storage location of docker image files:

# Edit /etc/default/docker and add -g like:
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /mnt/docker-images"

Restart docker

Dirty quickie to install latest docker

This involves trusting/running a script from an unknown origin!

apt-get update; apt-get install -y curl; curl -sSL https://get.docker.com/ | sh