-
Notifications
You must be signed in to change notification settings - Fork 500
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
Update docker build and push instructions in README #555
Update docker build and push instructions in README #555
Conversation
Update build your own docker section in README.md
Kudos, SonarCloud Quality Gate passed! |
Codecov Report
@@ Coverage Diff @@
## master #555 +/- ##
=======================================
Coverage 76.98% 76.98%
=======================================
Files 98 98
Lines 2368 2368
=======================================
Hits 1823 1823
Misses 402 402
Partials 143 143 |
if [ $# -eq 2 ]; then | ||
DOCKER_REPO=$1 | ||
TAG=$2 | ||
fi | ||
|
||
if [ $# -eq 1 ]; then | ||
DOCKER_REPO=$1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just wondering, rather than doing all of this, would it make sense for the user to use the existing make docker-build
and then use docker tag
for creating an image in user's docker registry.
If we accept variables from the CLI, we should ideally validate it and I feel that may not be necessary if we document the docker tag
command.
What do you think @dev-gaur?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an image tag being used locally, should be user's responsibility and i don't think any prod-level image usage will occur locally.
For validation, docker can validate the username & repo name and tag for the respective user when the user pushes the image to a registry for further usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if the user simply runs make docker-build
without any arguments, then simply the image will be tagged as accurics/terrascan:<git-commit>
, just like before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel keeping the make target will be better as we'll be able to edit the scripts underneath in the future as well without breaking the usage command everytime.
No description provided.