All of these images have been published to Docker Hub for easy usage as base images or as a way to copy software from them in a multi-stage build Dockerfile
.
Dockerize is a very useful utility written by Jason Wilder to simplify running applications in Docker containers.
It allows you to:
- Generate application configuration files at container startup time from templates and container environment variables
- Tail multiple log files to stdout and/or stderr
- Wait for other services to be available using TCP, HTTP(S), unix before starting the main process.
See usage examples here.
Why create this? The jwilder/dockerize
images are alpine
based and just copying /usr/local/bin/dockerize
from one of his images into an ubuntu
image fails with dependency issues when you try running dockerize
.
Image | Description |
---|---|
cbp44/dockerize:bionic cbp44/dockerize:latest |
Official ubuntu:bionic image as base with dockerize installed. |
cbp44/dockerize:xenial |
Official ubuntu:xenial image as base with dockerize installed. |
# Displays dockerize help
docker run --rm cbp44/dockerize:latest --help
FROM cbp44/dockerize:latest as dockerize
# Waits until google.com is reachable inside of the container and runs echo command if it eventually is reachable. If it isn't reachable in 10 seconds, the container exits with failed exit status.
CMD dockerize -wait http://google.com && echo "Hello World"