diff --git a/www/docs/ci/travis.md b/www/docs/ci/travis.md index 6a037e1c4..fb9438fae 100644 --- a/www/docs/ci/travis.md +++ b/www/docs/ci/travis.md @@ -13,7 +13,7 @@ addons: packages: - snapcraft -# needed only if you use the docker pipe +# needed only if you use the Docker pipe services: - docker @@ -22,7 +22,7 @@ script: - curl -sfL https://git.io/goreleaser | sh -s -- check # check goreleaser config for deprecations after_success: -# docker login is required if you want to push docker images. +# Docker login is required if you want to push Docker images. # DOCKER_PASSWORD should be a secret in your .travis.yml configuration. - test -n "$TRAVIS_TAG" && docker login -u=myuser -p="$DOCKER_PASSWORD" # snapcraft login is required if you want to push snapcraft packages to the diff --git a/www/docs/cookbooks/cgo-and-crosscompiling.md b/www/docs/cookbooks/cgo-and-crosscompiling.md index ed67823c2..8030b5eb5 100644 --- a/www/docs/cookbooks/cgo-and-crosscompiling.md +++ b/www/docs/cookbooks/cgo-and-crosscompiling.md @@ -1,5 +1,5 @@ # Cross-compiling Go with CGO -Best option to cross-compile Go project with CGO dependencies would be in using docker image. +Best option to cross-compile Go project with CGO dependencies would be in using Docker image. [This project](https://github.com/troian/golang-cross) provides the [image](https://hub.docker.com/repository/docker/troian/golang-cross) with bunch of ready to use cross-compilers as well as how-to make sysroot. All that wrapped into [example](https://github.com/troian/golang-cross-example) diff --git a/www/docs/customization/docker.md b/www/docs/customization/docker.md index 62ae26fac..f0ddd26c2 100644 --- a/www/docs/customization/docker.md +++ b/www/docs/customization/docker.md @@ -35,7 +35,7 @@ COPY mybin / This configuration will build and push a Docker image named `user/repo:tagname`. !!! warning - Note that we are not building any go files in the docker + Note that we are not building any go files in the Docker build phase, we are merely copying the binary to a `scratch` image and setting up the `entrypoint`. @@ -73,7 +73,7 @@ dockers: # 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 + # 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. @@ -82,8 +82,9 @@ dockers: # Path to the Dockerfile (from the project root). dockerfile: Dockerfile - # Set the "backend" for the docker pipe. - # Valid options are: docker, buildx + # 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 @@ -97,6 +98,11 @@ dockers: - "--build-arg=FOO={{.Env.Bar}}" - "--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 @@ -195,10 +201,10 @@ This will build and publish the following images to `docker.io` and `gcr.io`: - `gcr.io/myuser/myimage:v1.6.4` - `gcr.io/myuser/myimage:latest` -## Applying docker build flags +## Applying Docker build flags -Build flags can be applied using `build_flag_templates`. The flags must be -valid docker build flags. +Build flags can be applied using `build_flag_templates`. +The flags must be valid Docker build flags. ```yaml # .goreleaser.yml @@ -227,3 +233,22 @@ docker build -t myuser/myimage . \ !!! tip Learn more about the [name template engine](/customization/templates/). + +## Podman + +You can use [`podman`](https://podman.io) instead of `docker` by setting `use` to `podman` on your config: + +```yaml +# .goreleaser.yml +dockers: + - + image_templates: + - "myuser/myimage" + use: podman +``` + +Note that GoReleaser will not install Podman for you, nor change any of its configuration. +Also worth noticing that currently Podman only works on Linux machines. + +!!! info + The Podman backend is a [GoReleaser Pro feature](/pro/). diff --git a/www/docs/customization/docker_manifest.md b/www/docs/customization/docker_manifest.md index df6691506..f654f7723 100644 --- a/www/docs/customization/docker_manifest.md +++ b/www/docs/customization/docker_manifest.md @@ -48,8 +48,8 @@ docker_manifests: push_flags: - --insecure - # Skips the docker manifest. - # If you set this to 'false' or 'auto' on your source docker configs, + # Skips the Docker manifest. + # If you set this to 'false' or 'auto' on your source Docker configs, # you'll probably want to do the same here. # # If set to 'auto', the manifest will not be created in case there is an @@ -57,6 +57,16 @@ docker_manifests: # # Defaults to false. skip_push: false + + # Set the "backend" for the Docker manifest pipe. + # Valid options are: docker, podman + # + # Relevant notes: + # 1. podman is a GoReleaser Pro feature and is only available on Linux; + # 2. if you set podman here, the respective docker configs need to use podman too. + # + # Defaults to docker. + use: docker ``` !!! tip @@ -126,3 +136,23 @@ docker_manifests: That config will build the 2 Docker images defined, as well as the manifest, and push everything to Docker Hub. + +## Podman + +You can use [`podman`](https://podman.io) instead of `docker` by setting `use` to `podman` on your config: + +```yaml +# .goreleaser.yml +docker_manifests: +- name_template: foo/bar:{{ .Version }} + image_templates: + - foo/bar:{{ .Version }}-amd64 + - foo/bar:{{ .Version }}-arm64v8 + use: podman +``` + +Note that GoReleaser will not install Podman for you, nor change any of its configuration. +Also worth noticing that currently Podman only works on Linux machines. + +!!! info + The Podman backend is a [GoReleaser Pro feature](/pro/). diff --git a/www/docs/customization/monorepo.md b/www/docs/customization/monorepo.md index d37dde110..6d0e85792 100644 --- a/www/docs/customization/monorepo.md +++ b/www/docs/customization/monorepo.md @@ -34,7 +34,7 @@ Then, the following is different from a "regular" run: - Release name gets prefixed with `{{ .ProjectName }} ` if empty; - All build's `dir` setting get set to `monorepo.folder` if empty; - if yours is not, you might want to change that manually; -- Extra files on the release, archives, docker builds, etc are prefixed with `monorepo.folder`; +- Extra files on the release, archives, Docker builds, etc are prefixed with `monorepo.folder`; - On templates, `{{.PrefixedTag}}` will be `monorepo.prefix/tag` (aka the actual tag name), and `{{.Tag}}` has the prefix stripped; The rest of the release process should work as usual. diff --git a/www/docs/pro.md b/www/docs/pro.md index 18f64a1d9..19527979c 100644 --- a/www/docs/pro.md +++ b/www/docs/pro.md @@ -2,10 +2,11 @@ GoReleaser Pro is now available with some unique features such as: +- Build [Docker images](/customization/docker/#podman) and [manifests](/customization/docker_manifest/#podman) with [Podman](https://podman.io); +- [Easy apt and yum repositories with fury.io](/customization/fury/); - Ability to [include](/customization/includes/) config files (useful for common configurations); - Improved global hooks and [global after hooks](/customization/hooks/); - [Monorepo support](/customization/monorepo/); -- [Easy apt and yum repositories with fury.io](/customization/fury/); - [Custom template variables](/customization/templates/#custom-variables) (goes well with [includes](/customization/includes/)).