Public | Automated Build

Last pushed: a month ago
Short Description
A base image for java applications
Full Description

kodehuset/base-image-java

Introduction

A base image for java applications based on Ubuntu:16.04.

The image is designed to be able to run applications as a nonroot user with a random user id (compatible with cloud platforms like Openshift).

It uses nss_wrapper for user mapping and runs the app through tini.

Many of the features of this image have been inspired by an article series by Graham Dumpleton, specifically the following articles;

Features

How to use

The following example shows how to create an image with a self executing spring boot application. Note that you should change the ownership of the application to application:root and allow (at least) group execute rights (to enable the application to be run as a different user than root).

Also, remember to switch back to the application user after you have added the application and changed ownership.

FROM kodehuset/base-image-java:latest

USER root

ADD a-spring-boot-application.jar $HOME/bin/start.sh
RUN chmod -R 775 $HOME/bin
RUN chown -R application:root $HOME/bin

USER application
Docker Pull Command
Owner
kodehuset
Source Repository

Comments (0)