Skip to content

Commit 0a16068

Browse files
authored
Merge pull request #749 from snyk/feat/add_gcloud
[RUN-1516] Add gcloud
2 parents 95319f8 + d3fbae4 commit 0a16068

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ RUN chmod 755 /usr/bin/dumb-init
3434
RUN groupadd -g 10001 snyk
3535
RUN useradd -g snyk -d /srv/app -u 10001 snyk
3636

37+
# Install gcloud
38+
RUN curl -sL https://sdk.cloud.google.com > /install.sh
39+
RUN bash /install.sh --disable-prompts --install-dir=/
40+
ENV PATH=/google-cloud-sdk/bin:$PATH
41+
RUN rm /install.sh
42+
3743
WORKDIR /srv/app
3844

3945
COPY --chown=snyk:snyk --from=skopeo-build /usr/bin/skopeo /usr/bin/skopeo

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,24 @@ The Snyk Integration ID is used in the `--from-literal=integrationId=` parameter
4343

4444
Create a file named `dockercfg.json`. Store your `dockercfg` in there; it should look like this:
4545

46-
```json
46+
```hjson
4747
{
48+
// If your cluster does not run on GKE or it runs on GKE and pulls images from other private registries, add the following:
4849
"auths": {
4950
"gcr.io": {
5051
"auth": "BASE64-ENCODED-AUTH-DETAILS"
5152
}
5253
// Add other registries as necessary
54+
},
55+
56+
// If your cluster runs on GKE and you are using GCR, add the following:
57+
"credHelpers": {
58+
"us.gcr.io": "gcloud",
59+
"asia.gcr.io": "gcloud",
60+
"marketplace.gcr.io": "gcloud",
61+
"gcr.io": "gcloud",
62+
"eu.gcr.io": "gcloud",
63+
"staging-k8s.gcr.io": "gcloud"
5364
}
5465
}
5566
```

0 commit comments

Comments
 (0)