This image provides a standard ubuntu docker base image for other docker images to build on top of.
This is created specifically to be run under OpenShift Origin and Kubernetes. However it is expected to function in any standard Docker environment.
Ensure you specify a user id (UID) other than zero. Running as root is not tested / support a supported configuration.
You can easily extend the behavour of this image in the following ways
-
/hooks/entrypoint-pre.d/
Executables placed in this directory are executed very early on, before anything else is done. -
/hooks/entrypoint-run
If it exists, this is executed if the default command is not overridden. After it's execution completes the default command is executed. -
/hooks/entrypoint-exec
If it exists, this is executed if default command is overridden. After it's execution completes the default command is executed. -
/hooks/supervisord-pre.d/
Executables placed in this directory are executed just before supervisord is executed. -
/hooks/supervisord-ready
If it exists, this is executed once supervisord is read. This is triggered from supervisord itself, when it fires the SUPERVISOR_STATE_CHANGE_RUNNING event.
- Make a Dockerfile and specify
1and1internet/ubuntu-18
on theFROM
line. - Anything you want run in the container should be started by supervisord.
- Use a directory called files if you need to copy files in to your new image (see Dockerfile for this image as an example).
A simple Makefile is included for your convience. It assumes a linux environment with a docker socket avialable at /var/run/docker.sock
To build and test just run make
.
You can also just make pull
, make build
and make test
separately.
Please see the top of the Makefile for various variables which you may choose to customise. Variables may be passed as arguments, e.g. make IMAGE_NAME=bob
or make build BUILD_ARGS="--rm --no-cache"
The tests depend on shared testing code found in its own git repository called drone-tests.
To use a different tests repository set the TESTS_REPO variable to the git URL for the alternative repository. e.g. make TESTS_REPO=https://github.com/1and1internet/drone-tests.git
To use a locally modified copy of the tests repository set the TESTS_LOCAL variable to the absolute path of where it is located. This variable will override the TESTS_REPO variable. e.g. make TESTS_LOCAL=/tmp/github/1and1internet/drone-tests/
.