Skip to content

Commit c3c2176

Browse files
authored
Add configurable docker entrypoint (#904)
* make docker entrypoint configurable * add documentation for DOCKER_ENTRYPOINT
1 parent af809d0 commit c3c2176

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Note that some of these currently tied only to a single option, but we still lea
191191
* **DEBUG_BASH** (default: not set): If set with any value (e.g. ``true``), all executed commands that are not printed by default to reduce print space will be printed.
192192
* **DOCKER_COMMIT** (default: not set): If set, the docker image, which contains the build and test artifacts, will be saved in a Docker image. If unset, the container will not be commited and is removed. The value is used to specify an image name during the ``docker commit`` command. *Note* while this allows you to use the resulting docker image with eg. `docker run -it <DOCKER_COMMIT> /bin/bash`, the main intended use is with the `rerun_ci` feature or subsequent `industrial_ci`runs, which also manages attaching the required volumes etc.
193193
* **DOCKER_COMMIT_MSG** (default: not set): used to specify a commit during the docker commit command which is triggered by setting ``DOCKER_COMMIT``. If unset and if ``DOCKER_COMMIT`` is set then the commit message will be empty. See more ``DOCKER_COMMIT``.
194+
* **DOCKER_ENTRYPOINT** (default: not set): Used to specify an entrypoint for the docker image.
194195
* **DOCKER_IMAGE** (default: not set): Selects a Docker images different from default one. Please note, this disables the handling of ``ROS_REPOSITORY_PATH`` and ``ROS_DISTRO`` as ROS needs already to be installed in the image.
195196
* **DOCKER_PULL** (default: ``true``): set to false if custom docker image should not be pulled, e.g. if it was created locally
196197
* **DOCKER_RUN_OPTS** (default: not set): Used to specify additional run options for Docker.

industrial_ci/src/isolation/docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
export DOCKER_COMMIT=${DOCKER_COMMIT:-}
1919
export DOCKER_COMMIT_MSG=${DOCKER_COMMIT_MSG:-}
2020
export DOCKER_CREDENTIALS=${DOCKER_CREDENTIALS-.docker .gitconfig .ssh .subversion}
21+
export DOCKER_ENTRYPOINT=${DOCKER_ENTRYPOINT:-}
2122
export DOCKER_PULL=${DOCKER_PULL:-true}
2223
export _BUNDLE_ICI=${_BUNDLE_ICI:-false}
2324

@@ -104,7 +105,7 @@ function ici_isolate() {
104105

105106
ici_run_cmd_in_docker "${_docker_run_opts[@]}" "${run_opts[@]}" \
106107
-t \
107-
--entrypoint '' \
108+
--entrypoint "$DOCKER_ENTRYPOINT" \
108109
-w "$TARGET_REPO_PATH" \
109110
"$DOCKER_IMAGE" \
110111
/bin/bash "$ICI_SRC_PATH/run.sh" "$file" "$@"

0 commit comments

Comments
 (0)