Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
arthurdm Merge pull request #57 from OpenLiberty/arturdzm
Run docker image as non-root, add configuration snippets
Latest commit 7c1b649 Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
common
community Run docker image as non-root, add configuration snippets Mar 20, 2019
official Run docker image as non-root, add configuration snippets Mar 20, 2019
.gitignore Clean logs after server warmup Oct 26, 2018
.travis.yml Initial set up for Travis builds Feb 5, 2019
LICENSE
README.md Update README.md Feb 19, 2019
sync-master.sh Run docker image as non-root, add configuration snippets Mar 20, 2019

README.md

Docker Hub images

There are three different Open Liberty Docker image sets available on Docker Hub:

  1. Official Images: available here, these are re-build automatically anytime something changes in the layers below, and updated with new Open Liberty binaries as they become available (generally every 4 weeks). The Dockerfiles can be found in the official directory.

  2. Daily Images: available here, these are daily images from the daily Open Liberty binaries. The scripts used for this image can be found here.

  3. Community Images: available here, these are images using OpenJ9 in the JVM. The Dockerfiles can be found in the community directory.

Building an application image

According to Docker's best practices you should create a new image (FROM open-liberty) which adds a single application and the corresponding configuration. You should avoid configuring the image manually, after it started (unless it is for debugging purposes), because such changes won't be present if you spawn a new container from the image.

Even if you Docker save the manually configured container, the steps to reproduce the image from open-liberty will be lost and you will hinder your ability to update that image.

The key point to take-away from the sections below is that your application Dockerfile should always follow a pattern similar to:

FROM open-liberty

# Add my app and config
COPY Sample1.war /config/dropins/
COPY server.xml /config/

This will result in a Docker image that has your application and configuration pre-loaded, which means you can spawn new fully-configured containers at any time.

Updating common files

Currently the common folder contains the docker-server and README.md files. When making changes to these files first make the changes in common and then run sync-master.sh to copy these files to the directories the files need to be in for the Docker build. All the files need to be checked into git. Docker won't allow you to copy files from the parent directory structure, so this allows us to update once, rather than having to update in multiple locations.

You can’t perform that action at this time.