Archives annuelles : 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

Spring Security – Filter chains and request authorization

The important components WebSecurityConfigurer instances When we enable Spring Security in a Spring application, we benefit automatically from one WebSecurityConfigurer instance or multiple of them if we included other spring dependencies that require them such as oauth2 deps Each WebSecurityConfigurer … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Angular and Spring Boot served by an Apache HTTPD server

The virtual host configuration In Ubuntu, it is in the sites-enabled/000-default.conf  <VirtualHost *:89> LogLevel trace8 LogLevel rewrite:trace8   ServerName localhost:89 DocumentRoot /var/www/quizz   RewriteEngine on   # don’t rewrite and stop the chain RewriteRule ^(/api|/processLogin|/logout-b)($|/) – [L]   # If … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Spring Boot (2.X) and Angular 5 : Authentication

Spring Boot security configuration It adds the configuration for both basic and form login authent from the front end. An interesting thing is that we need to override some handlers to prevent Spring from redirecting to a front web page. … Continuer la lecture

Publié dans Non classé | Laisser un commentaire