Improve Dependency Downloading in Dockerfile#8
Open
Aryamanraj wants to merge 1 commit intolynoferraz:mainfrom
Open
Improve Dependency Downloading in Dockerfile#8Aryamanraj wants to merge 1 commit intolynoferraz:mainfrom
Aryamanraj wants to merge 1 commit intolynoferraz:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior:
Currently, the Dockerfile uses the following command to download dependencies:
RUN while read DEP; do wget -O $DEP; done < dependenciesError:
Dockerfile:15
13 | COPY shasumfile .
14 | RUN while read DEP; do wget -O $DEP; done < dependencies
15 | >>> RUN sha1sum -c shasumfile
16 |
17 |
ERROR: failed to solve: process "/bin/sh -c sha1sum -c shasumfile" did not complete successfully: exit code: 1
This command expects each line in the dependencies file to be a URL. However, the -O option in wget is used to specify the local file name that the remote file should be saved as. Without specifying the remote file URL, this command could potentially fail or lead to unexpected behaviors.
Proposed Change:
Modify the dependency downloading command to accommodate a dependency file that contains both the file name and the URL. The suggested modification is:
RUN while read -r NAME URL; do wget -O "$NAME" "$URL"; done < dependenciesWith this change, the dependencies file should contain pairs of file names and URLs, allowing each downloaded file to be saved with a specific name.