Compare commits

...

3 commits

Author SHA1 Message Date
PRIHLOP
45193a9e38
Merge 37baeca031 into b328867f6b 2024-12-09 14:12:27 +01:00
b328867f6b
chore(main): release 0.3.1 (#48)
🤖 I have created a release *beep* *boop*
---


<details><summary>0.3.1</summary>

##
[0.3.1](https://github.com/apricote/hcloud-upload-image/compare/v0.3.0...v0.3.1)
(2024-12-07)


### Bug Fixes

* **cli:** local install fails because of go.mod replace
([#47](https://github.com/apricote/hcloud-upload-image/issues/47))
([66dc5f7](66dc5f70b6))
</details>

<details><summary>hcloudimages: 0.3.1</summary>

##
[0.3.1](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.3.0...hcloudimages/v0.3.1)
(2024-12-07)


### Bug Fixes

* **cli:** local install fails because of go.mod replace
([#47](https://github.com/apricote/hcloud-upload-image/issues/47))
([66dc5f7](66dc5f70b6))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-12-07 01:57:59 +01:00
Ilja Malachowski
37baeca031 Add Dockerfile and instructions to use it. 2024-11-15 17:57:49 +01:00
6 changed files with 52 additions and 2 deletions

View file

@ -1 +1 @@
{".":"0.3.0","hcloudimages":"0.3.0"}
{".":"0.3.1","hcloudimages":"0.3.1"}

View file

@ -1,5 +1,12 @@
# Changelog
## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/v0.3.0...v0.3.1) (2024-12-07)
### Bug Fixes
* **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95))
## [0.3.0](https://github.com/apricote/hcloud-upload-image/compare/v0.2.1...v0.3.0) (2024-06-23)

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM golang:1.23-alpine AS builder
RUN apk --no-cache add ca-certificates
WORKDIR /usr/src/app
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /usr/src/app/dist/ ./...
FROM scratch AS runtime
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/src/app/dist/hcloud-upload-image /bin/hcloud-upload-image
ENTRYPOINT ["/bin/hcloud-upload-image"]

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:

View file

@ -1,5 +1,12 @@
# Changelog
## [0.3.1](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.3.0...hcloudimages/v0.3.1) (2024-12-07)
### Bug Fixes
* **cli:** local install fails because of go.mod replace ([#47](https://github.com/apricote/hcloud-upload-image/issues/47)) ([66dc5f7](https://github.com/apricote/hcloud-upload-image/commit/66dc5f70b604ed3ee964576d74f94bdcea710c95))
## [0.3.0](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.2.0...hcloudimages/v0.3.0) (2024-06-23)

View file

@ -2,7 +2,7 @@ package version
var (
// version is a semver version (https://semver.org).
version = "0.3.0" // x-release-please-version
version = "0.3.1" // x-release-please-version
// versionPrerelease is a semver version pre-release identifier (https://semver.org).
//