Using Jib to Build Docker Images for Spring Boot 2 Applications

If you want to create a Docker image from your Spring Boot 2 application you can use various plugins for Gradle or Maven. They all have in common that the application itself will be added as a single layer containing the full jar including all dependencies. For a typical Spring Boot 2 application this means, that for each build an image layer of at least 60MB has to be pushed to the registry.
Read more

Use a Docker container to run a shell

If you need to run a shell script in a specific environment than your current host you can use a temporary Docker container and link it to the current directory. For example if you want to run a bash script on ubuntu you can store the script file in the current directory and start a temporary ubuntu container: $ docker container run --rm -v $(pwd):/root -it ubuntu /bin/bash Inside the container you can then access the script in the /root directory:
Read more

How to pass HTTP proxy settings to the build process of a docker container

When building a docker image you may need http proxy settings to download artefacts from the internet. You can pass the http proxy settings (http_proxy, https_proxy) from the host system into the docker container during build: $ docker build -t <image_tag> . --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy

[100 Days of Code] Day 028: May 6, 2017

Today’s Progress: Setup the 100 Days of Code Log on my blog, update the blog to run in a container with an nginx frontend and SSL fed by certbot. Things I’ve learned: How to setup ghost in a docker container, setup nginx, setup certbot Things I’ve planned for tomorrow: Work on the Spring Security part of the expense tracker project again. Link(s) to work: Blog