Commit d863f853 authored by Brian Long's avatar Brian Long
Browse files

added ENTRYPOINT_EXEC

parent 31f0a2da
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ FROM ${os.image.prefix}${os.image.name}:${os.image.version}${os.image.suffix}

ENV SKIP_ENTRYPOINT_SCRIPTS=false
ENV VERBOSE=true
ENV ENTRYPOINT_EXEC=

# these are effectively immutable; provided to be used by extending images
# the entrypoint will re-set these in case they are changed
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ The following tools are available.

This image provides an entrypoint script that executes other entrypoint scripts, before executing the `CMD` (if provided).  It will execute any executable `.sh` scripts added to the path described by the `CONTAINERD_ENTRYPOINT_PATH` environment variable.  It will execute them in default sort order, so the use of numerical prefixes (`00_first.sh` or `99_last.sh`) may be wise.

You may also provide an `ENTRYPOINT_EXEC` to prefix all `CMD` executions in the entrypoint.  For instance, you could use `ENTRYPOINT_EXEC=java` so container executions would always be executing `java`.

### Extensible Certificate Authority

This image detects files in the path described by the `CACERT_INSTALL_PATH` environment variable.  If a file is found, it will treat it as a certificate and add it to the trusted certificates in all supported contexts.
@@ -26,6 +28,7 @@ This image detects files in the path described by the `CACERT_INSTALL_PATH` envi
| Name                         | Default         | Mutable |
| ---------------------------- | --------------- |:-------:|
| `SKIP_ENTRYPOINT_SCRIPTS`    | `false`         | Yes     |
| `ENTRYPOINT_EXEC`            | *none*          | Yes     |
| `VERBOSE`                    | `true`          | Yes     |
| `CONTAINERD_ENTRYPOINT_PATH` | *not important* | No      |
| `CACERT_INSTALL_PATH`        | *not important* | No      |
+7 −2
Original line number Diff line number Diff line
@@ -35,7 +35,12 @@ if ! find ${CACERT_INSTALL_PATH}/ -maxdepth 0 -empty | read JUNK; then
    update-ca-certificates
fi

if [[ -z ${ENTRYPOINT_EXEC} ]]; then
    if [[ ! -z $1 ]]; then
        ifecho "Executing command ..."
        exec "$@"
    fi
else
    ifecho "Executing command ..."
    exec "${ENTRYPOINT_EXEC} $@"
fi