Skip to content

Commit

Permalink
switch build ctx to goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalvas committed Jun 19, 2021
1 parent 5a9f4f1 commit 02bc154
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
34 changes: 33 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nfpms:
vendor: The VitalVas
homepage: https://github.com/vitalvas/vxdb
maintainer: The VitalVas <source@vitalvas.com>
description: Simple Key-Value NoSQL database with simplest API interface
description: Simple schema-less Key-Value NoSQL database with simplest API interface
license: MIT
formats:
- deb
Expand All @@ -22,3 +22,35 @@ nfpms:
dst: /lib/systemd/system/vxdb.service
file_info:
mode: 0644

dockers:
- image_templates:
- "vitalvas/vxdb:{{ .Tag }}-amd64"
use_buildx: true
goarch: amd64
dockerfile: Dockerfile
extra_files:
- LICENSE
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- image_templates:
- "vitalvas/vxdb:{{ .Tag }}-arm64"
use_buildx: true
goarch: arm64
dockerfile: Dockerfile
extra_files:
- LICENSE
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"

docker_manifests:
- name_template: vitalvas/vxdb:{{ .Tag }}
image_templates:
- vitalvas/vxdb:{{ .Tag }}-amd64
- vitalvas/vxdb:{{ .Tag }}-arm64
- name_template: vitalvas/vxdb:latest
image_templates:
- vitalvas/vxdb:{{ .Tag }}-amd64
- vitalvas/vxdb:{{ .Tag }}-arm64
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
FROM golang:latest
WORKDIR /app
COPY . .
RUN go build -o vxdb ./...

FROM ubuntu:latest
COPY --from=0 /app/vxdb /bin/vxdb
COPY vxdb /bin/vxdb
ENV DB_PATH="/data"
CMD ["/bin/vxdb"]

0 comments on commit 02bc154

Please sign in to comment.