alpine images for building and running Erlang on OpenShift
- Based on the official Erlang Docker images
- Alpine base
- Assumes the application is listening on ports 8080 and/or 8443
- Uses separate build and runtime images
s2i
does not support Docker build stages, but this concept is close
See the s2i
docs for more detailed information.
$ docker pull donkeybanana/s2i-erlang-builder
$ docker pull donkeybanana/s2i-erlang-runtime
Alternatively, clone this repo and build locally
$ make images
# or
$ docker build -t donkeybanana/s2i-erlang-builder builder
$ docker build -t donkeybanana/s2i-erlang-runtime runtime
Using https://github.com/erlang/docker-erlang-example as our example application:
# Clone the application repository
$ git clone https://github.com/erlang/docker-erlang-example
# Run s2i
$ s2i build docker-erlang-example/dockerwatch \ # local path as build input
donkeybanana/s2i-erlang-builder \ # builder image
--runtime-image donkeybanana/s2i-erlang-runtime \ # specify runtime image
donkeybanana/erlang-dockerwatch # output image