GitHub Actions ignores/overrides Docker container’s entrypoint

  docker, github, github-actions

I’m trying to port a GitLab Pipeline to GitHub Actions, where we use Docker containers to provide the runtime environment. In GitLab, we simply use a line image: $DOCKER_TAG. The images are built by ourselves, which use a script as the entry point ENTRYPOINT ["/run.sh"]. The script sets up environment (e.g., by sourcing the setvars.sh script for the Intel compilers and calling ulimit -s unlimited, etc.) and calls exec "[email protected]" at the end. For GitHub, I am using

container:
  image: ${{ matrix.DOCKER_TAG }}

However, the commands to be run later cannot find the needed binaries. Looking at the log, it appears that the container was created with --entrypoint "tail", causing the run.sh script to be ignored. I tried adding options: --entrypoint '/run.sh' in the Workflow YAML file, but it did not get reflected in how the container was created and the command still failed.

I may be missing something obvious, though I checked both the documentation and Google. Is there any way to use the entrypoint provided by the image without creating a Docker container action?

Source: Docker Questions

LEAVE A COMMENT