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

docker: remove unused build tools #1060

Merged
merged 1 commit into from Feb 16, 2021

Conversation

pujan14
Copy link
Contributor

@pujan14 pujan14 commented Feb 15, 2021

Signed-off-by: Pujan Shah pujan14@gmail.com

Removed unused build tools from dockerfile and added default argument to image with CMD

Copy link
Member

@bendrucker bendrucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with the user-facing change proposed here, but if those APK packages in the builder phase are unnecessary, happy to accept that change on its own.

Dockerfile Outdated
@@ -12,7 +12,14 @@ LABEL maintainer=terraform-linters

RUN apk add --no-cache ca-certificates

COPY --from=builder /tflint/dist/tflint /usr/local/bin
# copy tflint from builder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these comments, they are unnecessarily re-stating things that can be readily inferred from the code. Everything happening here is basic and well-documented upstream. You can assume basic understanding of Dockerfiles here and not try to explain how they work.

Dockerfile Outdated
WORKDIR /data

# set the default entrypoint -- when this container is run, use this command
ENTRYPOINT [ "tflint" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the formatting consistent with Docker's docs, meaning no array padding:

https://docs.docker.com/engine/reference/builder/

Dockerfile Outdated
ENTRYPOINT [ "tflint" ]

# as we specified an entrypoint, this is appended as an argument (i.e., `tflint --help`)
CMD [ "--help" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the best default command, as opposed to invoking TFLint with no arguments, which is implicitly the same as tflint .?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverting back to original behaviour

Signed-off-by: Pujan Shah <pujan14@gmail.com>
@bendrucker bendrucker changed the title Remove unused build tools and added default argument to image with CMD docker: remove unused build tools Feb 16, 2021
@bendrucker bendrucker merged commit acecd88 into terraform-linters:master Feb 16, 2021
@pujan14 pujan14 deleted the Cleanup-dockerfile branch February 17, 2021 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants