Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@quajones
Copy link
Contributor

@quajones quajones commented Jan 4, 2023

@quajones quajones changed the title add cloudbuild network flag for cloudrun cloudbuild step enable cloudbuild network for cloudbuild step Jan 4, 2023
@quajones quajones marked this pull request as ready for review January 4, 2023 21:34
@quajones quajones changed the title enable cloudbuild network for cloudbuild step [cloudrun] enable cloudbuild network for cloudbuild step Jan 4, 2023
Dockerfile Outdated
WORKDIR $APP_HOME

# Install dependencies.
RUN pip install keyrings.google-artifactregistry-auth==1.1.1
Copy link
Collaborator

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.

Copy link
Collaborator

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?

Copy link
Contributor Author

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, "."],
Copy link
Collaborator

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!

WORKDIR $APP_HOME
# Install dependencies.
RUN pip install keyrings.google-artifactregistry-auth==1.1.1
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator

@anovis anovis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!

@anovis anovis merged commit bd63996 into goblet:main Jan 5, 2023
@quajones quajones deleted the dockerfile branch January 27, 2023 21:43
quajones added a commit to quajones/goblet that referenced this pull request Oct 19, 2023
- 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)
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.

2 participants