Skip to content

Commit 121b811

Browse files
committed
Added Docker images creation and links
1 parent e7e7aab commit 121b811

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/release.yml

+23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# yamllint disable rule:line-length
23
name: release
34

45
on:
@@ -34,3 +35,25 @@ jobs:
3435
goarch: ${{ matrix.goarch }}
3536
goversion: "1.21.5"
3637
extra_files: LICENSE README.md
38+
39+
docker:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@v3
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v3
48+
- name: Login to Docker Hub
49+
uses: docker/login-action@v3
50+
with:
51+
username: ${{ secrets.DOCKERHUB_USERNAME }}
52+
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
- name: Build and push
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: .
57+
platforms: linux/amd64,linux/arm,linux/arm64
58+
push: true
59+
tags: gherynos/vault-backend:${{ github.ref_name }}, gherynos/vault-backend:latest

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Build the application
2+
FROM golang:1.21.5 as build
3+
4+
WORKDIR /go/src/app
5+
COPY . .
6+
7+
RUN go mod download
8+
RUN CGO_ENABLED=0 go build -o /go/bin/app
9+
10+
# Base image
11+
FROM gcr.io/distroless/static-debian12:nonroot
12+
13+
COPY --from=build /go/bin/app /
14+
15+
EXPOSE 8080
16+
17+
CMD ["/app"]

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ path "secret/metadata/vbk/cloud-services-lock"
8484
}
8585
```
8686

87+
## Docker
88+
89+
The Docker images for Vault Backend are available here: <https://hub.docker.com/r/gherynos/vault-backend>
90+
91+
Example execution command:
92+
93+
```shell
94+
docker run -d -p 8080:8080 -e VAULT_URL=https://some.vault.address:8200 gherynos/vault-backend
95+
```
96+
8797
## Author
8898

8999
> GitHub [@gherynos](https://github.com/gherynos)

0 commit comments

Comments
 (0)