Run build.sh
script: this will generate the jar and Docker image ready to be run.
Execute docker run -P <image-tag>
(to bind container port to a random host port) or docker run -p8080:8080 <image-tag>
(to bind it to a specific local port)
Note: <image-tag>
is the GCR url that is printed at the end the execution of build.sh
.
The values injected into the containers are available using environent variables. The application consumes them in two ways:
- Directly from the envs using System.getEnv()
- Using Spring properties.
The first option is straightforward. You can see this on DockeriserApplication.kt
You can see the second option in these files: