docker-hub-images
docker-hub-images copied to clipboard
Entrypoint definition prevents the images to be used in Bamboo
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.
Buddy is also affected from this
We cannot use it in GitLab CI, either.
@skubi did you find a way around this for Bamboo?
@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.
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"]
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.
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=