This repository is providing snipplets for an internal training and is most likely not useful for anyone else.
1) Create your Docker account: https://hub.docker.com/signup (you can use a temporary e-mail address if you like)
1) Login and startup to your playground: https://labs.play-with-docker.com/
1) Click + ADD NEW INSTANCE
1) hit Alt+Enter in the terminal window for fullscreen
Now the fun can begin.
type this into the terminal (or use copy & paste)
mkdir mywebapp && cd mywebapp
touch docker-compose.yml
1) open the file docker-compose.yml
using the built-in web-editor (or use vi)
1) copy & paste the content of stack.yml
from https://hub.docker.com/_/wordpress/ into your file
1) save the file
1) deploy the stack:
docker-compose up
1) click on 80
next to OPEN PORT
, go through the basic Wordpress setup (set the password!) and shortly enjoy your website before we
1) press CTRL+c to shutdown the containers and start them again, this time propery in the background ("detached")
docker-compose up -d
Look at all the Open Security Issues. Then filter for Milestone "today".
1) segregate networks 1) implement ingres proxy with HTTPS
The solution is documented in the comments of the issues.
docker-compose up -d
use the link "443" on the webpage. What do you see?
1) replace MYURL
with the hostname from the url (without https://
and trailing /
)
2) apply your changes: docker-compose up -d
Now go to the URL (make sure it's https), look at the certificate, accept the risk. What went wrong? Find our by yourself:
docker-compose logs traefik
by clicking at the "9999" link
Your new website should be online now. Congratulations!
docker-compose up -d
docker-compose ps
docker-compose logs [service]
docker-compose restart [service]
docker-compose down
docker-compose exec [container] sh
docker-compose pull && docker-compose up -d
# pull repository
git clone https://github.com/tobi-nmx/docker-training.git
# enter stack directory
cd docker-training/mywebsite/
# pull, create and start containers
docker-compose up -d
# Now you need to copy the URL from the "443" link the next to "OPEN PORT"
# then replace the link inside the file "docker-compose.yml" line 30
# by using vi, the built-in editor or the following command.
# Remove the http:// and trailing slash - keep the hostname only!
sed -i 's/MYURL/XXX/g' docker-compose.yml
# Apply changes
docker-compose up -d
# now you can enter the hostname in your browser, change to https, accept the risk