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…
SpringBoot, Axon, Multiple Data Sources = ? are you doin’?
Ok, so, after playing with this for few days, I have decided to put this into a form of a post, to serve mostly as a reference for anyone facing the same or similar problem. After all, how do you think I solve my problems? Just like that, I search online for solution, then for…
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
Run SpringBoot app inside alpine docker container
Build the image: docker build -t alpine-java-3 . Run the image, map the ports 8080 to host machine: docker run -d -p 8080:8080 alpine-java-3
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…
Maven/Gradle – exclude tests
Excldue tests in Maven, example: Maven documentation. Exclude tests in Gradle, example: Gradle documentation.
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…