-
Notifications
You must be signed in to change notification settings - Fork 111
Make the Docker images usable in CI #37
Comments
For those watching this issue and using GitLab CI: apparently GitLab now lets you override the entry point using the |
@christophgysin, @3bola and @brunoleite: have you happened to have a chance to look at whether you could override the entrypoint from GitLab CI's configuration, as should be possible from GitLab 9.4? I've spent the past day trying to implement it, but can't seem to get it to work, so I'm wondering whether it's 8000 possible and if so, how other people do it :) (Tagging you due to your +1's on this issue.) |
@Vinnl I tried various things, but I always have something like:
|
Actually, using an empty entry point did the trick:
|
@rpadovani That unfortunately also results in the following for me:
That said, I'm using TerraForm, not Packer:
|
@Vinnl try with your own runner - it doesn't work on shared runners for me |
I had similar problems with Packer base image on CircleCI. Here is my # CircleCI 2.0 configuration file
version: 2
jobs:
build:
working_directory: ~/app
docker:
- image: hashicorp/packer:light
entrypoint: ''
steps:
- checkout
- run:
name: Validate Packer templates
command: |
/bin/sh -c '/bin/packer validate ./templates/my_template.json' |
Tried the
|
@jonatanblue Sorry for dragging you in like this, but I saw your comment in your Docker image without |
Using this template worked for us: https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/Terraform.gitlab-ci.yml |
No worries :) Either you change the CI config (GitLab now allows for this), or you build your own image without an entrypoint, which is what I did in the gitlab-ci-terraform project. |
Thanks you both! I did not manage to change the GitLab config as required, but @lagartoflojo's configuration of setting the entrypoint to |
However, Bamboo still does not seem to have a possibility to overwrite the It is neither defined in the Bamboo Spec documentation nor available on the UI. Thus, I would be happy to have this issue reopened. |
We are using rootless podman through a custom executor for GitLab. As the custom executors are not receiving the entrypoint we cannot overwrite it and cannot use the official terraform images. |
Uh oh!
There was an error while loading. Please reload this page.
I'm not too familiar with Docker, so my apologies in advance if this issue is misguided...
So as I understand it, the official Docker images define an
ENTRYPOINT
, which make it difficult to use TerraForm in CI, having to explicitly override it. To exacerbate this issue, GitLab CI doesn't even allow you to override it, leading to various forks being created with varying degrees of up-to-date-ness.Now, I'm not sure if there's a way to make the current image more suitable for CI use, or whether an additional image would be a feasible solution, but... It would be really nice to be able to easily use TerraForm in CI without having to fork it yourself or having to trust someone other than Hashicorp.
The text was updated successfully, but these errors were encountered: