Improve Dockerfile and add push workflow#141
Merged
Conversation
aht007
commented
Oct 14, 2022
| RUN apt-get update && apt-get upgrade -y | ||
| RUN apt-get install -y vim python3-virtualenv python3-pip | ||
| RUN apt-get install -y sudo | ||
| RUN apt-get install -y sudo git |
Contributor
Author
There was a problem hiding this comment.
Adding git package for subsequent PR, where we will use it for fetching latest changes to repo while running tests in CI
aht007
commented
Oct 14, 2022
| WORKDIR /codejail | ||
|
|
||
| # Clone Requirement files | ||
| COPY ./requirements/sandbox.txt ./codejail/requirements/sandbox.txt |
Contributor
Author
There was a problem hiding this comment.
Improvement to the image building process. Requirements Cache wouldn't be busted this way if there are code changes but no change to requirements file.
aht007
commented
Oct 14, 2022
|
|
||
| # Setup sudoers file | ||
| ADD sudoers-file/01-sandbox /etc/sudoers.d/01-sandbox | ||
| COPY sudoers-file/01-sandbox /etc/sudoers.d/01-sandbox |
Contributor
Author
There was a problem hiding this comment.
We are just copying local files and hence COPY command is the most suitable one for that.
UsamaSadiq
approved these changes
Oct 20, 2022
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.
This PR improves the existing codejail Dockerfile. We copy code files after installing the requirements so that changes to code don't bust the cached requirements layers in docker image.
This PR also adds
gitpackage in Dockerfile so that we can use it to fetch recent changes while running tests on PRs.Finally this PR also adds a push workflow to push latest CI image to ECR.