goreleaser / goreleaser-cross

Docker image for Golang cross-compiling with CGO
MIT License
134 stars 23 forks source link

No docker login in entry point #40

Closed osechet closed 1 year ago

osechet commented 1 year ago

Description

My CI was refusing to push Docker images to GitLab registry until I found the instructions provided by the documentation (https://goreleaser.com/ci/gitlab/) did not apply to goreleaser-cross. The issue is related to the entrypoint of this image that is not the same as the official goreleaser image. Having the same entrypoint in both images would make it easier to switch from one to the other.

Do you think it would be possible?

Note: I fixed the problem by creating my own image from goreleaser/goreleaser-cross and replacing the entrypoint by the one from goreleaser/goreleaser.

FROM goreleaser/goreleaser-cross:v1.20.5

COPY goreleaser-entrypoint.sh /entrypoint.sh

How to reproduce?

Follow the documentation https://goreleaser.com/ci/gitlab/ but replace the image goreleaser/goreleaser by goreleaser/goreleaser-cross in the docker run command. The CI will fail with "docker images: failed to publish artifacts: failed to push registry.gitlab.com/...:latest: exit status 1: denied: access forbidden"