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

Update docker build and push instructions in README #555

Closed

Conversation

devang-gaur
Copy link
Contributor

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Feb 17, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #555 (3358544) into master (10d6706) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #555   +/-   ##
=======================================
  Coverage   76.98%   76.98%           
=======================================
  Files          98       98           
  Lines        2368     2368           
=======================================
  Hits         1823     1823           
  Misses        402      402           
  Partials      143      143           

Comment on lines +7 to +14
if [ $# -eq 2 ]; then
DOCKER_REPO=$1
TAG=$2
fi

if [ $# -eq 1 ]; then
DOCKER_REPO=$1
fi
Copy link
Contributor

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?

Copy link
Contributor Author

@devang-gaur devang-gaur Feb 19, 2021

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants