https://github.com/moeki0/barruun-docker
Docker image for barruun gem
https://github.com/moeki0/barruun-docker
docker docker-image gcp ruby
Last synced: about 1 month ago
JSON representation
Docker image for barruun gem
- Host: GitHub
- URL: https://github.com/moeki0/barruun-docker
- Owner: moeki0
- Created: 2022-01-19T00:21:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T02:04:04.000Z (over 4 years ago)
- Last Synced: 2025-07-31T13:37:08.887Z (11 months ago)
- Topics: docker, docker-image, gcp, ruby
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Barruun Docker
Barruun is a simple tool for Infrastructure as Code of Google Cloud Platform using `gcloud` command.
## Usage
### Local
To use this image, pull from Docker Hub, run the following command:
```
docker pull cckawakami/barruun:latest
```
Then, authenticate by running:
```
docker run -ti --name gcloud-config cckawakami/barruun gcloud auth login
```
Once you authenticate successfully, credentials are preserved in the volume of the gcloud-config container.
To list compute instances using these credentials, run the container with `--volumes-from`:
```
docker run --rm -ti \
--env PROJECT_ID=xxx \
--volumes-from gcloud-config \
--volume $PWD/sink.yml:/workspace/sink.yml \
cckawakami/barruun barruun logging sink /workspace/sink.yml
```
For more information on how to use Barruun, see [here](https://github.com/cc-kawakami/barruun).
### Cloud Build
Authentication and file mount are done automatically.
But you must set environment variables.
```yaml
steps
- name: cckawakami/barruun:latest
waitFor: ['-']
args: ['barruun', 'logging', 'sink', '/workspace/cloudbuild/logging/sink.yml']
env:
- 'PROJECT_ID=$PROJECT_ID'
```