-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use of wget
to pull source code in Dockerfile
#145
Comments
Please note the |
I see, the It may be inappropriate to move the |
Its fine to put the Dockerfile in the root directory. |
In the
Dockerfile
, use ofwget
to get the latest release from the GitHub releases is pretty strange, and IMO an anti-pattern. IMO, theDockerfile
should be put in the root of the project directory, and copy the source code directly from the project withCOPY . .
, instead of pulling the latest release from the web.Imagine a case where someone wishes for whatever reason to build a Docker image for an older version of
agate
. They would download the desired release from the releases page, and then build theDockerfile
. TheDockerfile
would query the Internet for the latest release, and then download it. They would get the latest release ofagate
, not the version they specifically cloned to build! This would be solved by the proposed change.Additionally, imagine a case where someone wishes to build a Docker image for a "development" version of the code straight from the latest git commit, rather than the latest stable release. The above case would apply again.
This change would also futureproof against a possible future CI pipeline, in which the Docker image may be automatically built. This should certainly be built against the current state of the code, not whatever the latest stable release on GitHub is.
I am more than happy to open a PR with the above proposed changes, should the primary developer(s) agree with the sentiment. Open to discussion as well.
The text was updated successfully, but these errors were encountered: