Skip to content

entrypoint: false doesn't disable default image entrypoint #138

@orien

Description

@orien

In v3.3.0, the entrypoint documentation specifies:

Set it to false to disable the default entrypoint for the image.

However, doing so doesn't disable the entrypoint and I see no --entrypoint flag in the logged docker run command.

steps:
  - command: ls
    plugins:
      - docker#v3.3.0:
          image: hashicorp/terraform:light
          entrypoint: false
docker run -it --rm --init --volume /var/lib/buildkite-agent/builds/xxxx:/workdir --workdir /workdir --env BUILDKITE_JOB_ID --env BUILDKITE_BUILD_ID --env BUILDKITE_AGENT_ACCESS_TOKEN --volume /usr/bin/buildkite-agent:/usr/bin/buildkite-agent --label com.buildkite.job-id=6b701e83-acb8-4834-a129-ccb3266577a7 hashicorp/terraform:light /bin/sh -e -c ls

Here the default entrypoint is being used and for this image ends up running terraform /bin/sh -e -c ls. This fails because /bin/sh is an invalid subcommand for terraform.

Work-around

Setting this attribute to an empty string seems to produce the desired behaviour.

entrypoint: ""
docker run -it --rm --init --volume /var/lib/buildkite-agent/builds/xxxx:/workdir --workdir /workdir --env BUILDKITE_JOB_ID --env BUILDKITE_BUILD_ID --env BUILDKITE_AGENT_ACCESS_TOKEN --volume /usr/bin/buildkite-agent:/usr/bin/buildkite-agent --entrypoint '' --label com.buildkite.job-id=107582c8-92e5-4a95-8e34-93523f5c6a82 hashicorp/terraform:light ls

Suggestion

I think we should update the plugin behaviour to match the documentation (alternatively, update the documentation to match the plugin behaviour).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions