Comments (13)
To anyone coming back to this much later like I did.
It can be solved using #551.
Specifically make sure to configure Docker Buildx like so:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
config-inline: |
[registry."custom-repo.net"]
http = true
insecure = true
from build-push-action.
To anyone coming back to this much later like I did. It can be solved using #551. Specifically make sure to configure Docker Buildx like so:
name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: config-inline: | [registry."custom-repo.net"] http = true insecure = true
I tried using this strategy, but I had a problem once I reached the login step. Below is my workflow... Any thoughts?
docker:
name: deploy image to docker registry
runs-on: ubuntu-latest
if: |
github.event_name != 'pull_request'
needs: [yarn, eslint, prettier, typescript]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[registry."${{ secrets.DOCKER_REGISTRY_DOMAIN }}"]
http = true
insecure = true
- name: Login to Docker
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY_DOMAIN }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to Docker Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKER_REGISTRY_DOMAIN }}/sbm-v3:latest
from build-push-action.
Update:
I tried to create a free https certificate by acmesh.sh and access it successed on the chrome, but when I push the image, it told me http: server gave HTTP response to HTTPS client
from build-push-action.
I'm already solved this problem, I can't use nginx proxy_pass the https to registry, it's not stable and I got some error.
from build-push-action.
i have same problem, how to solve it?
from build-push-action.
how is this solved?
from build-push-action.
I'm using it in a similar way except my registry does not require a login (and I use v2 of the repo's, but I doubt that's really anything). Are you sure your credentials are right?
from build-push-action.
Yes, when I log in via the CLI with the registry URL in the insecure-registries
section of the docker engine settings tab in Docker Desktop, I can log in with my creds with no problem. Without putting the registry URL in that config, I encounter the same exact error when trying to log in. It seems as if the config isn't being passed along or something.
❯ docker login my-domain
Username: my-user
Password:
Error response from daemon: Get "https://my-domain/v2/": http: server gave HTTP response to HTTPS client
Also, if your registry does not require a login, then how do you keep it secure?
from build-push-action.
Okay, sorry, then I don't know but I doubt it's the config as for me (and I suppose for someone else liking my post) that usually the config should be passed.
I keep it relatively safe by keeping it in an internal network, but definitely will add credentials at some point. There has not really been a need up to now.
from build-push-action.
I was unable to do this using the suggested solution docker/setup-buildx-action@v3
. I did this using the usual docker commands. Perhaps truncate
is too much here.
- name: Insecure Docker Repository
run: |
sudo truncate -s-2 /etc/docker/daemon.json
echo ", \"insecure-registries\": [\"${{ vars.DOCKER_HOST }}\"]}" | sudo tee -a /etc/docker/daemon.json
sudo systemctl restart docker
- name: Docker Auth
run: docker login ${{ vars.DOCKER_HOST }} --username=${{ vars.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
from build-push-action.
I was unable to do this using the suggested solution
docker/setup-buildx-action@v3
. I did this using the usual docker commands. Perhapstruncate
is too much here.- name: Insecure Docker Repository run: | sudo truncate -s-2 /etc/docker/daemon.json echo ", \"insecure-registries\": [\"${{ vars.DOCKER_HOST }}\"]}" | sudo tee -a /etc/docker/daemon.json sudo systemctl restart docker - name: Docker Auth run: docker login ${{ vars.DOCKER_HOST }} --username=${{ vars.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
This was a perfect solution for me. Thanks for the work!
from build-push-action.
I was unable to do this using the suggested solution
docker/setup-buildx-action@v3
. I did this using the usual docker commands. Perhapstruncate
is too much here.- name: Insecure Docker Repository run: | sudo truncate -s-2 /etc/docker/daemon.json echo ", \"insecure-registries\": [\"${{ vars.DOCKER_HOST }}\"]}" | sudo tee -a /etc/docker/daemon.json sudo systemctl restart docker - name: Docker Auth run: docker login ${{ vars.DOCKER_HOST }} --username=${{ vars.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
@PhoenixNazarov Were you still able to push to that registry? I am encountering a new, yet similar issue in my build-push action:
Error: buildx failed with: ERROR: failed to solve: failed to push ***/***-v3:latest: failed to do request: Head "https://***/v2/***-v3/blobs/sha256:2ac50195915c3fbb68a8083db890ef3a0bc6c4f2b9917961f7bcb24fa41ee707": http: server gave HTTP response to HTTPS client
from build-push-action.
- name: Docker Auth
run: docker login ${{ vars.DOCKER_HOST }} --username=${{ vars.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
I've encountered the same issue as well.
from build-push-action.
Related Issues (20)
- Docker file created is different than Docker file created at own terminal HOT 1
- Merge Multi-Platform Image w/ Imagetools Create: Pull Access Denied HOT 3
- Provenance ignored when set to false If Buildx version is not provided HOT 10
- Allow grouping output for the `docker buildx build` step after `Buildx version` step HOT 2
- Docker: Cannot create container for service: No command specified HOT 1
- Self-signed certificates do not work HOT 4
- Build/Push fails if the tag name matches an existing tag in the registry HOT 5
- The sha256 of registry cache config are mismatched for rerun multi-stage config. HOT 1
- buildx failed with: ERROR: invalid key-value pair "": empty key HOT 2
- Tarball output throws `ResourceExhausted` error HOT 4
- GIT context ignores changes in build secrets and use GHA build cache from other build HOT 8
- When using a matrix for multi-platform builds images get erased HOT 2
- Docker Hub login succeeds but push does not HOT 1
- Local cache remains empty despite cache-to and cache-from configuration HOT 4
- Support push and load being set together HOT 5
- header key "followpaths" contains value with non-printable ASCII characters HOT 9
- Request for new release HOT 1
- Action hangs after build HOT 3
- net/http: TLS handshake timeout HOT 1
- GHA/Local cache doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build-push-action.