Giter VIP home page Giter VIP logo

Comments (13)

michelkok avatar michelkok commented on May 20, 2024 2

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.

tonydawhale avatar tonydawhale commented on May 20, 2024 1

@michelkok

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?
image

  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.

jeffrey-lunaon avatar jeffrey-lunaon commented on May 20, 2024

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.

jeffrey-lunaon avatar jeffrey-lunaon commented on May 20, 2024

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.

robbyawaldi avatar robbyawaldi commented on May 20, 2024

i have same problem, how to solve it?

from build-push-action.

andylamax avatar andylamax commented on May 20, 2024

how is this solved?

from build-push-action.

michelkok avatar michelkok commented on May 20, 2024

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.

tonydawhale avatar tonydawhale commented on May 20, 2024

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.

michelkok avatar michelkok commented on May 20, 2024

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.

PhoenixNazarov avatar PhoenixNazarov commented on May 20, 2024

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 }}

telegram-cloud-photo-size-2-5353046375455117069-y

from build-push-action.

onursedef avatar onursedef commented on May 20, 2024

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 }}

telegram-cloud-photo-size-2-5353046375455117069-y

This was a perfect solution for me. Thanks for the work!

from build-push-action.

tonydawhale avatar tonydawhale commented on May 20, 2024

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 }}

telegram-cloud-photo-size-2-5353046375455117069-y

@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.

andream7 avatar andream7 commented on May 20, 2024
  • 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.