https://github.com/samgozman/create-docker-build-server
Little helper that can create and destroy temporary docker build server
https://github.com/samgozman/create-docker-build-server
Last synced: over 1 year ago
JSON representation
Little helper that can create and destroy temporary docker build server
- Host: GitHub
- URL: https://github.com/samgozman/create-docker-build-server
- Owner: samgozman
- License: mit
- Created: 2022-11-17T09:14:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-21T07:31:17.000Z (over 3 years ago)
- Last Synced: 2025-04-02T16:55:13.768Z (over 1 year ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create docker build server in Hetzner Cloud
Little helper that can create and destroy temporary docker build server.
I'm using it from time to time to build docker images on Hetzner Cloud if it is not possible to build it locally. (legacy code saying hello to the new Apple M1)
## Before you start
Make sure you have a working local docker installation and you have a Hetzner Cloud token for your project.
also you need to install Terraform (in my case via `brew`)
```sh
brew install terraform
```
## Additional preparations
Some little preparations are needed to make this work.
- clone this repo
- create a file `secrets.auto.tfvars` and add your Hetzner Cloud token: `hcloud_token = ""`
- grant the script execution permission: `chmod +x builder.sh`
- make sure you have created ssh key and it's located in `~/.ssh/id_rsa.pub`. Otherwise you need to change the path in `main.tf` file.
## Usage
You can run the script just like that:
```sh
source ~/Projects/create-docker-build-server/builder.sh
```
It will ask you what you want to do. You can create a new server or destroy a previously created one.
After successful creation you will get the IP address of the server. It will be automatically added to your `DOCKER_HOST` ENV.