Docker push: http: server gave HTTP response to HTTPS client #13915

Closed
opened 2025-11-02 10:57:11 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @hiifong on GitHub (Jan 5, 2025).

Description

docker daemon.json

➜  Dockerfile cat /etc/docker/daemon.json
{
  "insecure-registries": ["192.168.5.112:3000"]
}

Dockerfile:

FROM node:22-alpine3.21

RUN apk add --no-cache bash git curl jq

# Vulnerability fixes
RUN npm install -g npm@latest

ENTRYPOINT ["/bin/bash"]

docker client log:

➜  Dockerfile docker buildx build . -t 192.168.5.112:3000/test/multiarchtest:latest --platform linux/amd64,linux/arm64 --push
[+] Building 3.3s (11/11) FINISHED                                                           docker-container:mybuilder
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 183B                                                                               0.0s
 => [linux/arm64 internal] load metadata for docker.io/library/node:22-alpine3.21                                  2.9s
 => [linux/amd64 internal] load metadata for docker.io/library/node:22-alpine3.21                                  3.2s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.1s
 => [linux/amd64 1/3] FROM docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cf  0.0s
 => => resolve docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9  0.0s
 => [linux/arm64 1/3] FROM docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cf  0.0s
 => => resolve docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9  0.0s
 => CACHED [linux/arm64 2/3] RUN apk add --no-cache bash git curl jq                                               0.0s
 => CACHED [linux/arm64 3/3] RUN npm install -g npm@latest                                                         0.0s
 => CACHED [linux/amd64 2/3] RUN apk add --no-cache bash git curl jq                                               0.0s
 => CACHED [linux/amd64 3/3] RUN npm install -g npm@latest                                                         0.0s
 => ERROR exporting to image                                                                                       0.0s
 => => exporting layers                                                                                            0.0s
 => => exporting manifest sha256:55bde2b2b49fedac6e8fb48d7481020a343b2eecad5603d81218ca1ca5706c33                  0.0s
 => => exporting config sha256:19d062334727cd6b5b4f36b56b2cc0f05f0254abe825295c7ce3c9384a4370b0                    0.0s
 => => exporting attestation manifest sha256:544c45e6e52f255a8ab95b36fc99786db1e73d77f7c7258af7d1463c393947ba      0.0s
 => => exporting manifest sha256:cfa979a2bb67d70b02baa083919e012e0af3762012987a6b6c9243d699ab91f9                  0.0s
 => => exporting config sha256:dbebf66ffdb5ecb9a72a5a33cf906f0c19d70b4c3604cf43125ef59b552df341                    0.0s
 => => exporting attestation manifest sha256:df7868415aa1373bbf511e9e8a211a1e50c1b6592c83bcd9245526b184dd8517      0.0s
 => => exporting manifest list sha256:ee749f67fb8c0c4df2c30ea1ced4b0276c8442da1a7eb3fd4897faaa21671322             0.0s
 => => pushing layers                                                                                              0.0s
------
 > exporting to image:
------
ERROR: failed to solve: failed to push 192.168.5.112:3000/test/multiarchtest:latest: failed to do request: Head "https://192.168.5.112:3000/v2/test/multiarchtest/blobs/sha256:ca52a43bba35434eba04b169eece57196123e68067fbf3c8d6d574d665a3e164": http: server gave HTTP response to HTTPS client

View build details: docker-desktop://dashboard/build/mybuilder/mybuilder0/lr0daoxkqtckorl747gqrtkc3

gitea does not have any log output.

image

Gitea Version

main

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Mac OS

How are you running Gitea?

./gitea web

Database

None

Originally created by @hiifong on GitHub (Jan 5, 2025). ### Description docker daemon.json ```txt ➜ Dockerfile cat /etc/docker/daemon.json { "insecure-registries": ["192.168.5.112:3000"] } ``` Dockerfile: ```dockerfile FROM node:22-alpine3.21 RUN apk add --no-cache bash git curl jq # Vulnerability fixes RUN npm install -g npm@latest ENTRYPOINT ["/bin/bash"] ``` docker client log: ```txt ➜ Dockerfile docker buildx build . -t 192.168.5.112:3000/test/multiarchtest:latest --platform linux/amd64,linux/arm64 --push [+] Building 3.3s (11/11) FINISHED docker-container:mybuilder => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 183B 0.0s => [linux/arm64 internal] load metadata for docker.io/library/node:22-alpine3.21 2.9s => [linux/amd64 internal] load metadata for docker.io/library/node:22-alpine3.21 3.2s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.1s => [linux/amd64 1/3] FROM docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cf 0.0s => => resolve docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9 0.0s => [linux/arm64 1/3] FROM docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cf 0.0s => => resolve docker.io/library/node:22-alpine3.21@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9 0.0s => CACHED [linux/arm64 2/3] RUN apk add --no-cache bash git curl jq 0.0s => CACHED [linux/arm64 3/3] RUN npm install -g npm@latest 0.0s => CACHED [linux/amd64 2/3] RUN apk add --no-cache bash git curl jq 0.0s => CACHED [linux/amd64 3/3] RUN npm install -g npm@latest 0.0s => ERROR exporting to image 0.0s => => exporting layers 0.0s => => exporting manifest sha256:55bde2b2b49fedac6e8fb48d7481020a343b2eecad5603d81218ca1ca5706c33 0.0s => => exporting config sha256:19d062334727cd6b5b4f36b56b2cc0f05f0254abe825295c7ce3c9384a4370b0 0.0s => => exporting attestation manifest sha256:544c45e6e52f255a8ab95b36fc99786db1e73d77f7c7258af7d1463c393947ba 0.0s => => exporting manifest sha256:cfa979a2bb67d70b02baa083919e012e0af3762012987a6b6c9243d699ab91f9 0.0s => => exporting config sha256:dbebf66ffdb5ecb9a72a5a33cf906f0c19d70b4c3604cf43125ef59b552df341 0.0s => => exporting attestation manifest sha256:df7868415aa1373bbf511e9e8a211a1e50c1b6592c83bcd9245526b184dd8517 0.0s => => exporting manifest list sha256:ee749f67fb8c0c4df2c30ea1ced4b0276c8442da1a7eb3fd4897faaa21671322 0.0s => => pushing layers 0.0s ------ > exporting to image: ------ ERROR: failed to solve: failed to push 192.168.5.112:3000/test/multiarchtest:latest: failed to do request: Head "https://192.168.5.112:3000/v2/test/multiarchtest/blobs/sha256:ca52a43bba35434eba04b169eece57196123e68067fbf3c8d6d574d665a3e164": http: server gave HTTP response to HTTPS client View build details: docker-desktop://dashboard/build/mybuilder/mybuilder0/lr0daoxkqtckorl747gqrtkc3 ``` gitea does not have any log output. ![image](https://github.com/user-attachments/assets/28d9f1ea-dde0-4172-9b66-5488e4812703) ### Gitea Version main ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Mac OS ### How are you running Gitea? ./gitea web ### Database None
GiteaMirror added the type/bug label 2025-11-02 10:57:11 -06:00
Author
Owner

@hiifong commented on GitHub (Jan 5, 2025):

It has been confirmed that this is not a bug in gitea,On my rock5b (armbian) I can push.
image

@hiifong commented on GitHub (Jan 5, 2025): It has been confirmed that this is not a bug in gitea,On my rock5b (armbian) I can push. ![image](https://github.com/user-attachments/assets/6c89968c-277b-4ac5-a641-80ba096318b5)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13915