docker-hub-images icon indicating copy to clipboard operation
docker-hub-images copied to clipboard

Entrypoint definition prevents the images to be used in Bamboo

Open skubi opened this issue 5 years ago • 7 comments

The issue was initially described in the following ticket: https://github.com/hashicorp/docker-hub-images/issues/37

The issue has been closed because the GitLab CI allows overwriting the entrypoint command now.

However, Bamboo CI still does not seem to have a possibility to overwrite the entrypoint with Docker Runner (not Docker CLI, but when you run the jobs/deployment inside the container, in as called "isolated" environment - https://confluence.atlassian.com/bamboo/docker-runner-946020207.html).

It is neither defined in the Bamboo Spec documentation nor available on the UI. https://docs.atlassian.com/bamboo-specs/6.7.1/com/atlassian/bamboo/specs/api/builders/docker/DockerConfiguration.html

Thus, I would be happy to have this issue looked upon.

skubi avatar Jan 14 '19 13:01 skubi

Buddy is also affected from this

phumberdroz avatar Apr 04 '19 13:04 phumberdroz

We cannot use it in GitLab CI, either.

iakat avatar May 28 '19 13:05 iakat

@skubi did you find a way around this for Bamboo?

UbiquitousBear avatar May 18 '20 03:05 UbiquitousBear

@UbiquitousBear well, unfortunately, there was no easy way around it really, and I ended up maintaining custom image. I am not sure what is the status right now though as I dropped Bamboo in favour of alternatives.

skubi avatar May 21 '20 09:05 skubi

A Dockerfile which does the job for a temporary image:

FROM docker-pull.ctbto.org/hashicorp/terraform:0.14.2
ENTRYPOINT ["/usr/bin/env", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]

Cajga avatar Dec 09 '20 15:12 Cajga

For gitlab-ci, do:

image:
  name: hashicorp/packer:1.7.2
  entrypoint: ["/bin/bash", "-eux", "-c"]

Obviously, you can remove the "-eux", if you want... but this works the way you'd expect. https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image

But personally, I usually use ansible with packer and terraform, so I end up making an image from hashicorp/packer or hashicorp/terraform that add python3 and use pip to install ansible so that I don't have to wait for that stuff to be installed to use the final image, and also override the entrypoint in the new wrapper image.

bhundven avatar May 13 '21 18:05 bhundven

Bamboo gave the following feedback in a support ticket:

In the Extra arguments for the docker run box that you have in the Bamboo job docker configuration page, can you please try the following?

--entrypoint=

mieliespoor avatar Sep 01 '21 15:09 mieliespoor