-
Notifications
You must be signed in to change notification settings - Fork 28
[cloudrun] enable cloudbuild network for cloudbuild step #300
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
Conversation
Dockerfile
Outdated
| WORKDIR $APP_HOME | ||
|
|
||
| # Install dependencies. | ||
| RUN pip install keyrings.google-artifactregistry-auth==1.1.1 |
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.
not sure we want to include this pip install in the default Dockerfile. may be worth noting in the docs on how to add in order to install packages from a private repository.
actually we can add a comment so folks can uncomment as needed.
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.
do we need pip install keyring as well?
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.
keyring is installed as a dependency
| { | ||
| "name": "gcr.io/cloud-builders/docker", | ||
| "args": ["build", "-t", registry, "."], | ||
| "args": ["build", "--network=cloudbuild", "-t", registry, "."], |
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.
nice. we can keep this as the default!
goblet/write_files.py
Outdated
| WORKDIR $APP_HOME | ||
| # Install dependencies. | ||
| RUN pip install keyrings.google-artifactregistry-auth==1.1.1 |
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.
add as a comment in addition to a comment explaining when it would be needed.
Dockerfile
Outdated
| WORKDIR $APP_HOME | ||
|
|
||
| # Install dependencies. | ||
| RUN pip install keyrings.google-artifactregistry-auth==1.1.1 |
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.
do we need pip install keyring as well?
anovis
left a comment
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.
Great! Thank you!
- exposes cloudbuild network to docker build container, will enable access to ADC credentials within cloudbuild steps: https://cloud.google.com/build/docs/build-config-file-schema#network - adding keyrings to the Dockerfile will handle authentication and allow services to install packages directly from artifact registry: https://cloud.google.com/artifact-registry/docs/python/authentication#keyring (is required to be installed before packages can be installed)
Uh oh!
There was an error while loading. Please reload this page.