Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Change ENTRYPOINT to CMD for Packer #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acejam
Copy link

@acejam acejam commented May 2, 2019

This PR changes the Packer Dockerfile's to use CMD instead of ENTRYPOINT. This is how a majority of the official Docker images are designed. This design comes from a set of guidelines that have been put into place by the core Docker team for official images. You can find these guidelines here: https://github.com/docker-library/official-images#consistency

In our case, a recent plugin update has caused Jenkins to now follow this design convention more closely. We have already forked the Packer image to workaround the problem for now, but it would be good for the Packer (and Hashicorp) images to be updated to match this convention. An example of this Jenkins change can be found here: https://issues.jenkins-ci.org/browse/JENKINS-49446

@hashicorp-cla
Copy link

hashicorp-cla commented May 2, 2019

CLA assistant check
All committers have signed the CLA.

@SwampDragons
Copy link
Contributor

Hi, thanks for opening an issue. Big caveat here: I am no Docker expert. However, it seems to me that this change would prevent users from being able to use the light container as intended: instead of being able to run docker run -it hashicorp/packer:light version, now I have to run docker run -it hashicorp/packer:light packer version. I don't believe there's a way to directly pass the docker run command line args to append to the CMD inside the dockerfile. It's not a huge difference, but I suspect that one argument difference would break a lot of CI processes.

Is there a way to do what you want without changing current default behavior?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants