Table of Contents |
---|
Child pages (Children Display) |
---|
TIS Docker Images
Java
To build a Java Docker image, we build a base image based on Alpine Linux and OpenJDK using docker-alpine-java. The base image is built every night so we should have the latest
Image | Description | Jenkins | Schedule |
---|---|---|---|
docker-alpine-java | This is the base image based on Alpine Linux. It is built on the latest nimmis/alpine-micro and then applies the latest OS patches before installing the JDK | docker-alpine-java | Nightly |
hee-alpine-java-docker | This is a layer of customisation on top of the base JDK which installs a trust store and some additional scripts. | hee-alpine-java-docker | Nightly, triggered by successful docker-alpine-java build |
repository.lin.nhs.uk:5000/hee | Our applications are built on top of the hee-build-java-docker image when changes are pushed to Github. | project specific | On Git Push |
We need to pull updates from the upstream nimmis/docker-alpine-java Docker image when they become available.
Code Block |
---|
# Clone the TIS fork
$ git clone git@github.com:Health-Education-England/docker-alpine-java.git
$ cd docker-alpine-java
# Pull upstream changes, merge any conflicts.
$ git pull git@github.com:nimmis/docker-alpine-java.git master
# Push the changes back to our master
$ git push |
Image Labels
The build process labels our images so both images and containers can be inspected from the command line to see what is running and where and when it was built.
Code Block |
---|
{ "com.docker.compose.config-hash": "3deecd54ca2e32fd9a0a6a338c5e529bc1b9392d9a37ce89793d289147b5438e", "com.docker.compose.container-number": "1", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "revalidation", "com.docker.compose.service": "revalidation", "com.docker.compose.version": "1.9.0", "com.transformuk.hee.tis.artifact_id": "trainee-idrevalidation", "com.transformuk.hee.tis.build_number": "13351032", "com.transformuk.hee.tis.build_url": "https://build-hee.tis.transformcloudnhs.netuk/jenkins/job/mvn2dockerrevalidation/13351032/", "com.transformuk.hee.tis.build_version": "0.1.0.5-13351032", "com.transformuk.hee.tis.date": "2017-0102-1220 1511:58:05:51.435232134178", "com.transformuk.hee.tis.git_branch": "origin/master", "com.transformuk.hee.tis.git_commit": "unknown9f2042767819e65ab5bfa3540dcd23105da651af", "com.transformuk.hee.tis.git_url": "unknowngit@github.com:Health-Education-England/TIS-REVALIDATION.git", "com.transformuk.hee.tis.group_id": "com.transformuk.hee", "com.transformuk.hee.tis.image": "trainee-idrevalidation", "com.transformuk.hee.tis.job_name": "mvn2dockerrevalidation", "com.transformuk.hee.tis.packaging": "jar", "com.transformuk.hee.tis.version": "0.1.0.5", "com.transformuk.hee.tis.workspace": "/home/jenkins/data/jenkins/workspace/mvn2dockerrevalidation" } |
Validating Docker Versions
...
|
...
Once you have established the versions of the images, they can be added to the stage/platform.yml or prod/platform.yml if they are ready to release.
List Docker Images
Code Block |
---|
$ curl -u heedocker:XXXXXXXXXXX -X GET https://repository.tis.nhs.uk:5000/v2/hee/concerns/tags/list?n=100 |
Cleaning up Docker Hosts
There are two steps required to clean up a host;
...