Prerequisites
- Docker Engine
- if not installed, then run install script with root privileges
sudo ./install-docker-with-compose.sh
- (will install latest docker engine and docker-compose 1.11.2)
- if not installed, then run install script with root privileges
Scripted
- run install script with root privileges
sudo ./install.sh
Manual
- copy docker-nginx directory to /etc/
- make sure it looks like this:
/etc/docker-nginx
|-certs
| \-{empty directory}
|-docker-nginx.sh
\-nginx.tmpl
- copy docker-nginx.service to /etc/systemd/system/
- reload sytemd
systemctl daemon-reload
- test service
systemctl start docker-nginx.service
docker ps -a -f name=nginx
- should list 3 running containers- for potential debugging look at
systemctl status docker-nginx.service
- enable service for autostart
systemctl enable docker-nginx.service
- start/stop the containers
-systemctl (start|stop) docker-nginx.service
- start a reachabel container
docker run -d \
--name whoami-sample \
-e "VIRTUAL_HOST=whoami.sample.eu" \
-e "LETSENCRYPT_HOST=whoami.sample.eu" \
-e "LETSENCRYPT_EMAIL=admin@sample.eu" \
jwilder/whoami
- to enable CORS-Requests add
-e "ALLOW_CORS=true" \
- for test cases add
-e "LETSENCRYPT_TEST=true" \
to get a self signed certificate- useful to work around the certs/week limits of Let's Encrypt