docker

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Nginx (proxy) Docker container

Create required directories
mkdir -p /etc/docker/nginx/{conf.d,html}

Configure nginx as webserver
cat < /etc/docker/nginx/conf.d/default.conf
server {
listen 80;
server_name _;

root /usr/share/nginx/html;
index index.html index.htm;
}
EOF

Configure nginx as proxy
cat < /etc/docker/nginx/conf.d/proxy.conf
server {
listen 80;
server_name foo.example.com;

location / {
proxy_pass http://localhost:8080/;
}
}
EOF

Create container

Roundcube Docker container

Start container
docker run --name=roundcube \
-e ROUNDCUBEMAIL_DEFAULT_HOST=imap.example.com \
-e ROUNDCUBEMAIL_SMTP_SERVER=smtp.example.com \
-e ROUNDCUBEMAIL_SMTP_PORT=993 \
-p 8080:80 \
-d roundcube/roundcubemail

# UI
http://SERVER_IP:8080/

Links
https://hub.docker.com/r/roundcube/roundcubemail/

Docker

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.docker.sh -O - | bash -

#!/bin/bash

# install required packages
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

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

# add Docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# update package list
sudo apt-get update

# install Docker
sudo apt-get install -y docker-ce

Docker

Installation
https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository
http://www.panticz.de/install-docker

Add user to docker group
sudo usermod -aG docker $USER
su - $USER

systemctl enable docker
systemctl status docker

# Delete all containers
#docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q) -f

# Delete all images
docker rmi $(docker images -aq) -f

# fix missing btrf storage driver
sudo rm -rf /var/lib/docker/aufs

Debug / Run test container
docker info
docker run hello-world

Syndicate content