[GH-ISSUE #3903] Using VPS and NPM to Accelerate Docker Images #2560

Open
opened 2026-02-26 07:36:01 +03:00 by kerem · 2 comments
Owner

Originally created by @1945251yyq on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3903

Recently, I set up Docker image acceleration, but I seem to be encountering some issues.

4

Running docker pull domain/mysql results in the following error, but running docker pull domain/library/mysql works fine.

2

Similar issues occur with images like ubuntu, alpine, and python. However, running docker pull domain/linuxserver/emby works fine.

I suspect the issue arises because typical pull commands use the format repository/image, and for mysql, which has only the image name, the pull command fails as it treats the domain as the repository.

Below are some configurations I have in the Advanced section. These are configurations I pieced together that are able to run. I am not particularly knowledgeable in this area and hope to seek help here to achieve the ability to pull images using docker pull domain/mysql and similar commands.Thank you very much.

location /v2/ {
    proxy_pass https://registry-1.docker.io;
    proxy_set_header Host registry-1.docker.io;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_hide_header Docker-Distribution-Api-Version;
    add_header Docker-Distribution-Api-Version registry/2.0 always;
    proxy_set_header Authorization $http_authorization;
    proxy_pass_header Authorization;
    proxy_buffering off;
    proxy_intercept_errors on;
    recursive_error_pages on;
    error_page 301 302 307 = @handle_redirect;
}

location /token {
    proxy_pass https://auth.docker.io;
    proxy_set_header Host auth.docker.io;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

location @handle_redirect {
    resolver 1.1.1.1;
    set $saved_redirect_location '$upstream_http_location';
    proxy_pass $saved_redirect_location;
}
Originally created by @1945251yyq on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3903 Recently, I set up Docker image acceleration, but I seem to be encountering some issues. ![4](https://github.com/user-attachments/assets/8ec17af5-8c37-4ea9-bb0d-e5349a5175b9) Running docker `pull domain/mysql ` results in the following error, but running `docker pull domain/library/mysql` works fine. ![2](https://github.com/user-attachments/assets/9a656751-c701-460a-a389-3cd87568fe95) Similar issues occur with images like `ubuntu`, `alpine`, and `python`. However, running `docker pull domain/linuxserver/emby` works fine. I suspect the issue arises because typical pull commands use the format `repository/image`, and for `mysql`, which has only the image name, the pull command fails as it treats the domain as the repository. Below are some configurations I have in the **Advanced** section. These are configurations I pieced together that are able to run. I am not particularly knowledgeable in this area and hope to seek help here to achieve the ability to pull images using `docker pull domain/mysql` and similar commands.Thank you very much. ``` location /v2/ { proxy_pass https://registry-1.docker.io; proxy_set_header Host registry-1.docker.io; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_hide_header Docker-Distribution-Api-Version; add_header Docker-Distribution-Api-Version registry/2.0 always; proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization; proxy_buffering off; proxy_intercept_errors on; recursive_error_pages on; error_page 301 302 307 = @handle_redirect; } location /token { proxy_pass https://auth.docker.io; proxy_set_header Host auth.docker.io; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location @handle_redirect { resolver 1.1.1.1; set $saved_redirect_location '$upstream_http_location'; proxy_pass $saved_redirect_location; } ```
Author
Owner

@endless1651 commented on GitHub (Jul 31, 2024):

Your image still leaked your domain name. I suggest changing it

<!-- gh-comment-id:2259439728 --> @endless1651 commented on GitHub (Jul 31, 2024): Your image still leaked your domain name. I suggest changing it
Author
Owner

@github-actions[bot] commented on GitHub (Feb 14, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2658095140 --> @github-actions[bot] commented on GitHub (Feb 14, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2560
No description provided.