Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MangoTheCat/docker-docker-gcpsdk
Docker-in-Docker with GCP SDK
https://github.com/MangoTheCat/docker-docker-gcpsdk
Last synced: 3 months ago
JSON representation
Docker-in-Docker with GCP SDK
- Host: GitHub
- URL: https://github.com/MangoTheCat/docker-docker-gcpsdk
- Owner: MangoTheCat
- Created: 2019-04-23T09:03:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-12T11:40:56.000Z (over 5 years ago)
- Last Synced: 2024-06-22T20:25:13.109Z (5 months ago)
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/mangothecat/docker-docker-gcpsdk
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - MangoTheCat/docker-docker-gcpsdk - Docker-in-Docker with GCP SDK (Dockerfile)
README
# Docker with Google Cloud SDK
This docker image install `gcloud` and `kubectrl` on top of the `docker` image. This is used in our CI Pipeline for Google Kubernetes Engine.
## Versions
By default this will use `latest` version of Docker and Google SDK
# Usage
To use this package in your CI, try adding this to your `.gitlab-ci.yml` file:
```
build_docker_image:
image: MangoTheCat/docker-gke
tags:
- el7
stage: build
only:
- master
- tags
script:
- docker info
- export PATH=$PATH:/root/google-cloud-sdk/bin
- gcloud config set project $PROJECT_ID
- echo $K8S_SECRET_SERVICE_ACCOUNT > /tmp/$CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://gcr.io
- docker build -t gcr.io/${PROJECT_ID}/${APPNAME}:v${VERSION} .
- docker push gcr.io/${PROJECT_ID}/${APPNAME}:v${VERSION}
```## Author
[Adam Deacon](https://github.com/adamjdeacon) for [Mango Solutions](https://www.mango-solutions.com)
Thanks to [Tobias L. Maier](http://tobiasmaier.info)