Add Dockerfile and instructions to use it.

This commit is contained in:
Ilja Malachowski 2024-11-15 17:57:49 +01:00
parent 66dc5f70b6
commit 37baeca031
2 changed files with 36 additions and 0 deletions

View file

@ -45,6 +45,23 @@ Use your preferred wrapper to install:
yay -S hcloud-upload-image-bin
```
#### Docker
You can build a Docker image by cli command(from the root of this repo):
```shell
docker build -t hcloud-upload-image .
```
And the next, you can use it like this(for example):
```shell
docker run -ti --rm -e HCLOUD_TOKEN="<your token>" \
--image-url "https://example.com/disk-image-x86.raw.bz2" \
--architecture x86 \
--compression bz2
```
#### `go install`
If you already have a recent Go toolchain installed, you can build & install the binary from source: