Skip to content

Commit

Permalink
build: docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mxab committed Mar 14, 2023
1 parent afa70ee commit 6f1acdc
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,98 @@ changelog:
signs:
- artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]

dockers:
# You can have multiple Docker images.
-
# ID of the image, needed if you want to filter by it later on (e.g. on custom publishers).
id: nacp

# GOOS of the built binaries/packages that should be used.
# Default: `linux`.
goos: linux

# GOARCH of the built binaries/packages that should be used.
# Default: `amd64`.
goarch: amd64

# GOARM of the built binaries/packages that should be used.
# Default: `6`.
# goarm: ''

# GOAMD64 of the built binaries/packages that should be used.
# Default: `v1`.
goamd64: 'v2'

# IDs to filter the binaries/packages.
# Default: `empty`.
# ids:
# - mybuild
# - mynfpm

# Templates of the Docker image names.
image_templates:

- "ghcr.io/mxab/nacp:latest"
- "ghcr.io/mxab/nacp::{{ .Tag }}"


# Skips the docker build.
# Could be useful if you want to skip building the windows docker image on
# linux, for example.
#
# This field allows templates.
# Since: v1.14.0-pro.
# This option is only available on GoReleaser Pro.
#
# Defaults to false.
#skip_build: false

# Skips the docker push.
# Could be useful if you also do draft releases.
#
# If set to auto, the release will not be pushed to the Docker repository
# in case there is an indicator of a prerelease in the tag, e.g. v1.0.0-rc1.
#
# Defaults to false.
skip_push: false

# Path to the Dockerfile (from the project root).
#
# Defaults to `Dockerfile`.
#dockerfile: '{{ .Env.DOCKERFILE }}'

# Set the "backend" for the Docker pipe.
#
# Valid options are: docker, buildx, podman.
#
# Podman is a GoReleaser Pro feature and is only available on Linux.
#
# Defaults to docker.
use: docker

# Template of the docker build flags.
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64"

# Extra flags to be passed down to the push command.
# Defaults to empty.
# push_flags:
# - --tls-verify=false

# If your Dockerfile copies files other than binaries and packages,
# you should list them here as well.
# Note that GoReleaser will create the same structure inside a temporary
# folder, so if you add `foo/bar.json` here, on your Dockerfile you can
# `COPY foo/bar.json /whatever.json`.
# Also note that the paths here are relative to the folder in which
# GoReleaser is being run (usually the repository root folder).
# This field does not support wildcards, you can add an entire folder here
# and use wildcards when you `COPY`/`ADD` in your Dockerfile.
# extra_files:
# - config.yml
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ENTRYPOINT ["/nacp"]
COPY nacp /

0 comments on commit 6f1acdc

Please sign in to comment.