Add VPN to docker container

Your docker container tries to get access to external VPN.

The docker container will use bridge to talk to host or other containers by default.

It looks like default bridge defaults to localhost so for our case we are going to map new bridge to IP address assigned by VPN.

"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},

Install wordpress with docker Fedora 29

This is an introduction to docker. Get a docker image prepared by the software owner which you want to install.

In this tutorial we will download from docker hub the image for wordpress and the image for mysql/mariadb server.

The wordpress image has a little bit of magic in it, there is a php and httpd installation packaged with wordpress. There is also a mapping to connect to a mysql server.

The mysql server docker image is a standalone image. This will be used by wordpress docker image.

The docker hub. This is the “App Store” for docker.

Look for docker images here:

https://hub.docker.com/

For instance I will get docker image for wordpress:

Scroll down to read important information of this docker image. You will need to pass values to variables set by the creators of this image.

docker pull mariadb:latest
docker run -e MYSQL_ROOT_PASSWORD=XXX -e MYSQL_USER=wpuser -e MYSQL_PASSWORD=YYY -e MYSQL_DATABASE=wpdb -v /home/albertop/dvol/mysqldir/:/var/lib/mysql --name wordpressdb -d mariadb
docker pull wordpress:latest
docker run -e WORDPRESS_DB_USER=wpuser -e WORDPRESS_DB_PASSWORD=YYY -e WORDPRESS_DB_NAME=wpdb -p 80:80 -v /home/albertop/dvol/htmldir/:/var/www/html --link wordpressdb:mysql --name wpcontainer -d wordpress

Install docker Fedora 29

docker is available in official fedora repo. However, I recommend to use rpms directly from docker site:

https://download.docker.com/linux/fedora/29/

From here download rpms for:

docker-ce
docker-ce-client
containerd.io

Disable/uninstall sssd as this package will prevent to rpm to create docker group and usermod will fail.

containerd.io will not be recognized by rpm when installing docker-ce. Use
–-no-deps option for rpm when installing docker-ce.