Describe the bug
First of all, thanks a lot for goreleaser. Awesome tool! 馃
We are generating multiple docker images with goreleaser. Some images share files (for example docker-entrypoint.sh file). If you specify for every docker image via extra_files the same file, the release process will abort and fail with the following message:
release failed after 59.91s error=failed to link extra file 'docker/settings-docker.xml': link docker/settings-docker.xml dist/linux_amd64/settings-docker.xml: file exists
To Reproduce
Steps to reproduce the behavior:
before:
hooks:
- make compile_frontend static_assets
builds:
- main: ./cmd/gaia/main.go
binary: gaia-linux-amd64
goos:
- linux
goarch:
- amd64
checksum:
name_template: 'checksums.txt'
release:
prerelease: true
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- image: gaiapipeline/gaia
skip_push: false
binary: gaia-linux-amd64
dockerfile: docker/Dockerfile
extra_files:
- docker/docker-entrypoint.sh
- docker/settings-docker.xml
tag_templates:
- latest
- image: gaiapipeline/gaia
skip_push: false
binary: gaia-linux-amd64
dockerfile: docker/Dockerfile.golang
extra_files:
- docker/docker-entrypoint.sh
- docker/settings-docker.xml
tag_templates:
- "{{ .Tag }}-go"
- image: gaiapipeline/gaia
skip_push: false
binary: gaia-linux-amd64
dockerfile: docker/Dockerfile.java
extra_files:
- docker/docker-entrypoint.sh
- docker/settings-docker.xml
tag_templates:
- "{{ .Tag }}-java"
- image: gaiapipeline/gaia
skip_push: false
binary: gaia-linux-amd64
dockerfile: docker/Dockerfile.python
extra_files:
- docker/docker-entrypoint.sh
- docker/settings-docker.xml
tag_templates:
- "{{ .Tag }}-python"
Expected behavior
It should be clearly mentioned in the documentation that a file just needs to be defined once and where it should be defined (only first entry?).
Or even better, it is possible to define one file multiple times.
Environment (please complete the following information):
definitely a bug!
thanks for reporting!
Proposed a fix.
It was very hacky before, now I just create a new temp dir for every docker build, so they won't have to compete for resources or whatever. Should be much more stable :)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Proposed a fix.
It was very hacky before, now I just create a new temp dir for every docker build, so they won't have to compete for resources or whatever. Should be much more stable :)