Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker builds fail for builds within docker #4246

Closed
3 of 4 tasks
zbindenren opened this issue Aug 14, 2023 · 1 comment
Closed
3 of 4 tasks

Docker builds fail for builds within docker #4246

zbindenren opened this issue Aug 14, 2023 · 1 comment
Assignees
Labels
invalid This doesn't seem right

Comments

@zbindenren
Copy link
Contributor

zbindenren commented Aug 14, 2023

What happened?

We are building our docker images with goreleaser in gitlab pipelines. We are using docker as build containers and map the docker socket into the container.

Since the release of 1.20.0 all our builds fail with:

 release failed after 1m23s               error=docker build failed: failed to build linux-docker-staging-local.repo.pnet.ch/pf/create-go-app:0.29.1-20230814074824: exit status 1: WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 26.4s done
#1 creating container buildx_buildkit_default
#1 creating container buildx_buildkit_default 15.3s done
#1 41.68 time="2023-08-14T07:51:19Z" level=warning msg="using host network as the defaultime="2023-08-14T07:51:19Z" level=warning msg="using host network as the default"
#1 41.68 time="2023-08-14T07:51:19Z" level=warning msg="skipping containerd worker, as \"/run/containerd/containerd.sock\" does not exist"
#1 41.68 �dtime="2023-08-14T07:51:19Z" level=info msg="found 1 workers, default=\"ombq4yj0g9i90932zjl3nj5sc\""
#1 41.68 �`time="2023-08-14T07:51:19Z" level=warning msg="currently, only the default worker can be used."
#1 41.68 �\time="2023-08-14T07:51:19Z" level=info msg="running server on /run/buildkit/buildkitd.sock"
#1 41.68 time="2023-08-14T07:51:19Z" level=warning msg="skipping containerd worker, as \"/run/containerd/containerd.sock\" does not exist"
#1 41.68 time="2023-08-14T07:51:19Z" level=warning msg="currently, only the default worker can be used."
#1 41.68 �time="2023-08-14T07:51:19Z" level=warning msg="currently, only the default worker can be used."
#1 41.68 
#1 ERROR: http: invalid Host header
------
 > [internal] booting buildkit:
#1 41.68 
#1 41.68 
------
ERROR: http: invalid Host header
Learn more at https://goreleaser.com/errors/docker-build

The error persists even when I set:

dockers:
    - ids:
        - create-go-app
        - release-helper
      goos: linux
      use: docker       # <--- this
      goarch: amd64

How can we reproduce this?

I assume it is because of docker in docker builds. On my laptop it works and takes the docker driver.

goreleaser version

____       ____      _
 / ___| ___ |  _ \ ___| | ___  __ _ ___  ___ _ __
| |  _ / _ \| |_) / _ \ |/ _ \/ _` / __|/ _ \ '__|
| |_| | (_) |  _ <  __/ |  __/ (_| \__ \  __/ |
 \____|\___/|_| \_\___|_|\___|\__,_|___/\___|_|
goreleaser: Deliver Go Binaries as fast and easily as possible
https://goreleaser.com

GitVersion:    1.20.0
GitCommit:     56c9d09a1b925e2549631c6d180b0a1c2ebfac82
GitTreeState:  false
BuildDate:     2023-08-10T01:23:44Z
BuiltBy:       goreleaser
GoVersion:     go1.21.0
Compiler:      gc
ModuleSum:     h1:wvAbDqQwMX3PWPYc4VIeaWQB2V5HOETvDlyfTrk7NgQ=
Platform:      linux/amd64

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this

Supporter

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@zbindenren zbindenren added bug Something isn't working triage Issue pending triage by one of the maintainers labels Aug 14, 2023
@caarlos0
Copy link
Member

this issue is in docker: docker/cli#4437

@caarlos0 caarlos0 added invalid This doesn't seem right and removed bug Something isn't working triage Issue pending triage by one of the maintainers labels Aug 14, 2023
@caarlos0 caarlos0 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants