hashicorp / docker-hub-images

Automatic builds of container images for Docker Hub
Mozilla Public License 2.0
127 stars 111 forks source link

Change ENTRYPOINT to CMD for Packer #76

Open acejam opened 5 years ago

acejam commented 5 years ago

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 commented 5 years ago

CLA assistant check
All committers have signed the CLA.

SwampDragons commented 4 years ago

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?