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

using the gcloud sdk base image instead of installing the components ourselves #42

Merged
merged 2 commits into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
FROM alpine:3.7
FROM google/cloud-sdk:alpine

ENV GOOGLE_CLOUD_SDK_VERSION=223.0.0
ENV GOOGLE_APP_ENGINE_SDK_VERSION=1.9.68
ENV CLOUDSDK_APP_RUNTIME_ROOT=/google-cloud-sdk/platform/ext-runtime/
RUN apk add --no-cache curl python

# Install the gcloud SDK
RUN curl -fsSLo google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$GOOGLE_CLOUD_SDK_VERSION-linux-x86_64.tar.gz
RUN tar -xzf google-cloud-sdk.tar.gz
RUN rm google-cloud-sdk.tar.gz
RUN ./google-cloud-sdk/install.sh --quiet
RUN apk add -U --no-cache unzip

# Install the app engine SDKs
RUN ./google-cloud-sdk/bin/gcloud components install app-engine-go app-engine-java app-engine-php app-engine-python-extras alpha beta
ENV GOOGLE_APP_ENGINE_SDK_VERSION=1.9.68
Copy link
Contributor

Choose a reason for hiding this comment

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

why this version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's the latest version of the "Original" SDK available: https://cloud.google.com/appengine/docs/standard/go/download#previous-sdk

Copy link
Contributor

Choose a reason for hiding this comment

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

cool, thanks


# Install the legacy app engine SDK
RUN curl -fsSLo go_appengine_sdk_linux_amd64-$GOOGLE_APP_ENGINE_SDK_VERSION.zip https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-$GOOGLE_APP_ENGINE_SDK_VERSION.zip
RUN unzip -q go_appengine_sdk_linux_amd64-$GOOGLE_APP_ENGINE_SDK_VERSION.zip
RUN rm go_appengine_sdk_linux_amd64-$GOOGLE_APP_ENGINE_SDK_VERSION.zip

# Clean up
RUN rm -rf ./google-cloud-sdk/.install

ADD drone-gae /bin/
ENTRYPOINT ["/bin/drone-gae"]
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func validateVargs(vargs *GAE) error {
}

if vargs.GCloudCmd == "" {
vargs.GCloudCmd = "/google-cloud-sdk/bin/gcloud"
vargs.GCloudCmd = "gcloud"
}

return nil
Expand Down