-
Notifications
You must be signed in to change notification settings - Fork 517
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
How to create a presonal registry and allow to push by github actions. #44
Comments
Update: |
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. |
i have same problem, how to solve it? |
how is this solved? |
To anyone coming back to this much later like I did.
|
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 |
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? |
Yes, when I log in via the CLI with the registry URL in the ❯ 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? |
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 was unable to do this using the suggested solution
|
This was a perfect solution for me. Thanks for the work! |
@PhoenixNazarov Were you still able to push to that registry? I am encountering a new, yet similar issue in my build-push action:
|
I've encountered the same issue as well. |
Thanks. This works. It tripped me up at first, because of the Essentially, to make it clear, comparing the above to this:
|
I created a docer registry but have no https certificate, and I don't known how to push automatic by github actions.
I can push image locally if I configer in
/etc/docker/daemon.json
But I don't know how to push it when I use the Github Actions, I tried to edit the
/etc/docker/daemon.json
at the workflows, but It told me Permission denied.Push image directly:
The text was updated successfully, but these errors were encountered: