Archives mensuelles : décembre 2019

Docker networking

Networks : the available network drivers Subnet range calculation Docker subnet range by docker network 172.17.0.0/16 -> 65534 available addresses take an example address 192.168.0.0/16. Here you have 16 bits of the 32 for network addressing, leaving 16 bits for … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Maven with docker

Build a local project on a docker container with the Maven image docker run -it –rm -v $PWD:/usr/src/my-maven -v « $HOME »/.m2:/root/.m2 -w /usr/src/my-maven maven:3.5.2-jdk-8-alpine mvn install Some explanations : – –rm to automatically remove the container when it exits – -v … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Buildkit or Build Enhancements for Docker

Enable Buildkit For docker build command We need to define this variable : DOCKER_BUILDKIT=1. At each execution : DOCKER_BUILDKIT=1 docker build -t fooTag . Or we could also export it as an environment variable : export DOCKER_BUILDKIT=1 # or configure … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Docker build

Restrictions on image Image tag – the regex for the letters is all lower case, no upper case letters. – a hostname + optional port is allowed at the very beginning. – don’t use underscore because not more two underscores … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Nexus 3 : installation

Installing Nexus on Linux (without container) Download the Nexus archive and uncompress it into a target folder. The application consists of two folders : – nexus-3.XX.X – sonatype-work The first one contains the nexus application and the second contains the … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Docker-Compose

Environment variables Compose CLI environment variables These configure the docker-compose command line execution. COMPOSE_PROJECT_NAME Sets the project name. This value is prepended along with the service name to the container on start up. ex : COMPOSE_PROJECT_NAME=fooapp If the template declares … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Spring Boot – OAuth 2 – Inject the OAuth2Authentication in the controllers

There are multiple ways of retrieving user/client information associated to the token specified in a request. With Spring, a very simple way is adding a OAuth2Authentication parameter in the controller of the method we where want to get that information. … Continuer la lecture

Publié dans Non classé | Laisser un commentaire