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

gcloud: add an image with gcloud SDK installed #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions gcloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.12
RUN apk -v --update add \
python3 \
curl \
bash && \
curl https://sdk.cloud.google.com | CLOUDSDK_CORE_DISABLE_PROMPTS=1 bash && \
echo "source /root/google-cloud-sdk/path.bash.inc" > ~/.bashrc && \
/root/google-cloud-sdk/bin/gcloud config set disable_usage_reporting false && \
apk -v --purge del py-pip && \
rm /var/cache/apk/*
ENTRYPOINT ["/bin/bash"]
16 changes: 16 additions & 0 deletions gcloud/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NAME = pubnative/gcloud
IMAGE_VERSION = 0.0.1
VERSIONED = ${NAME}:${IMAGE_VERSION}
LATEST = ${NAME}:latest
ALL_COMMANDS = build push

all: $(ALL_COMMANDS)
.PHONY: $(ALL_COMMANDS)

build:
docker build --rm . -t ${VERSIONED}
docker tag ${VERSIONED} ${LATEST}

push:
docker push ${VERSIONED}
docker push ${LATEST}
16 changes: 16 additions & 0 deletions gcloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# gcloud

Alpine with gcloud CLI installed. Useful for scripts that need reach GCP
services, such as GCS.

## Build

`make build`

## push

`make push`

## Both

`make all`