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

Reduce duplication using a single Dockerfile #2178

Merged
merged 10 commits into from
Dec 10, 2021
Merged

Conversation

ferrarimarco
Copy link
Collaborator

@ferrarimarco ferrarimarco commented Nov 25, 2021

Proposed Changes

  1. Reduce code duplication by using a single Dockerfile for both the standard and slim flavors of the super-linter image. To stop at the right point, we use target build stages.
  2. Don't check if the versions file exist before building it. Setting the WRITE_LINTER_VERSIONS_FILE to true would suffice. This is necessary because we build the versions file twice (slim image, standard image) because we add more linters in the standard image, and need to rebuild the file to include those additional linters.
  3. Fix setting BUILD_DATE in all the workflows. It was empty before this fix.

PS: I know that there's a lot of duplication in GitHub Actions workflow definitions, but it's a job for another day.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

Requisites

@ferrarimarco ferrarimarco added automation related to helping the project operate more efficiently docker Pull requests that update Docker code labels Nov 25, 2021
@ferrarimarco ferrarimarco marked this pull request as ready for review December 9, 2021 20:32
@ferrarimarco ferrarimarco mentioned this pull request Dec 10, 2021
4 tasks
Copy link
Collaborator

@admiralAwkbar admiralAwkbar left a comment

Choose a reason for hiding this comment

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

@ferrarimarco This is amazing

@admiralAwkbar admiralAwkbar merged commit da61f61 into main Dec 10, 2021
@admiralAwkbar admiralAwkbar deleted the only-one-dockerfile branch December 10, 2021 16:15
sarahc23 pushed a commit to 23andMe/super-linter that referenced this pull request May 6, 2022
* Reduce duplication using a single Dockerfile

* Remove slim Dockerfile

* Update PROD and RELEASE workflows

* Fix apk package installing

* Force link creation

* Don't check if the versions file exist

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE
sarahc23 pushed a commit to 23andMe/super-linter that referenced this pull request May 6, 2022
* Reduce duplication using a single Dockerfile

* Remove slim Dockerfile

* Update PROD and RELEASE workflows

* Fix apk package installing

* Force link creation

* Don't check if the versions file exist

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation related to helping the project operate more efficiently docker Pull requests that update Docker code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants