Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate entrypoints in a multi-stage build are marked erroneously as an error #72

Open
mplewis opened this issue May 9, 2022 · 0 comments

Comments

@mplewis
Copy link

mplewis commented May 9, 2022

Issue details

I want Dockerlint to properly lint my multi-stage Dockerfiles. However, it doesn't seem to support using a CMD directive in more than one stage.

Steps to reproduce/test case

Put this into Dockerfile:

FROM busybox AS base

WORKDIR /tmp
CMD ["/bin/sh"]

########################################

FROM base AS whoami

CMD ["whoami"]

Then run dockerlint Dockerfile.

Expected behavior: Dockerlint succeeds on this file.

Actual behavior:

ERROR: Multiple CMD instructions found, only line 10 will take effect

ERROR: Dockerfile failed.

Affected version(s)

0.3.9

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

No branches or pull requests

1 participant