Multi-stage docker images

When working with docker images, it would be a good idea to keep the final image (especially for production) as small as possible. Usually, when building apps, there are a lot of extra stuff included that are really not necessary for the final image. This can be most obvious with Spring Boot applications, where build…

Docker volume on host machine – write access and shared permissions

Using docker for running all kinds of reports (reporting applications, such as performance tests or penetration tests etc.) in the CI is a common practice. However, sometimes you’d have to cleanup the report directory in order to create a new one. When running applications inside a docker, usually they will run as root and files…

Run WordPress inside Docker?

By using docker-compose, you can run WordPress site with one command. TLDR: https://github.com/divukman/wordpress-docker docker-compose.yaml: Running $ docker-compose up -d View site URL: http://127.0.0.1:8000 Stopping $ docker-compose down

Docker – Copy file from container to host directory

Ok, so here is one very common question. How do I copy file from a docker image instance (container) to a host file system? Why? One common scenario would be, for example, running a continuous integration server and running Cucumber tests. Once you generate the HTML report, you’d like to copy the file to host…

Start Tomcat as a Windows service in the debug mode

From the tomcat/bin directory, start the tomcat exe or right click it to get to the properties. In the properties dialog, click the Java tab and BEFORE all of the -D options, add something like this: Make sure they are first on the list and each in their own line. From then on, Tomcat should…

Iptables – Block incoming traffic

I have setup a small home Linux server, based on Debian Linux (stable) and a Lenovo ThinkCentre hardware. Now, I wanted to have an ssh access from outside and I have encountered a few problems that I would like to talk about here. CG NAT Carrier-grade NAT, in essence, means that your home network is…

Spring external .properties file

Before we proceed, be sure the check out the spring-cloud-config. Depending on your use case, this might be what you want , Spring Cloud Config. Lets say that we have following .properties files in our project: application.properties application-dev.properties application-prod.properties custom.properties Spring will use these files, if we do not tell it otherwise. We can override…