SUSE Support

Here When You Need Us

Add jFrog Artifactory registry using Port Docker Access Method through a reverse proxy

This document (000020933) is provided subject to the disclaimer at the end of this document.

Resolution

The documentation has a walk-through on JFrog Port Docker Access Method registry scanning.  This setup requires that the repository Advanced HTTP Setting must have the Registry Port defined.  Sometimes the Registry Port is left blank, leaving port mapping to a reverse proxy.  Below is an example of a JFrog Artifactory configured for Port Docker Access Method with nvdemo repository configured for access via reverse proxy.

Artifactory Setup

Administrator > Services > Artifactory > General > HTTP Settings

  • Docker Settings > Docker Access Method = Port
  • Reverse Proxy Settings > Server Provider = Nginx

Administration > Repositories > Repositories > "Docker Repository Name" > Advanced > HTTP Settings

  • Leave Registry Port blank

Reverse Proxy (Nginx Example) Configuration

server {
    listen 8083 ;
    listen 8443 ssl;
    server_name 10.1.7.62;
    if ($http_x_forwarded_proto = '') {
        set $http_x_forwarded_proto  $scheme;
    }
    ## Application specific logs
    ## access_log /var/log/nginx/10.1.7.62-access.log timing;
    ## error_log /var/log/nginx/10.1.7.62-error.log;
    rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/nvdemo/$1/$2;
    chunked_transfer_encoding on;
    client_max_body_size 0;
    location / {
    proxy_read_timeout  2400s;
    proxy_pass_header   Server;
    proxy_cookie_path   ~*^/.* /;
    proxy_buffer_size 128k;
    proxy_buffers 40 128k;
    proxy_busy_buffers_size 128k;
    proxy_pass          http://10.1.7.62:8082/artifactory;
    proxy_set_header    X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
    proxy_set_header    X-Forwarded-Port  $server_port;
    proxy_set_header    X-Forwarded-Proto $http_x_forwarded_proto;
    proxy_set_header    Host              $http_host;
    proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;        location ~ ^/artifactory/ {
            proxy_pass    http://10.1.7.62:8081;
        }
    }
}

Note: rewrite line points to the docker/nvdemo repository.  Anytime the configuration is change the reverse proxy should be restarted for the new configuration to take effect.


NeuVector Registry Setup

Configure the JFrog Artifactory registry with Port Docker Access Method.
Name: "Select a name"
Registry: https://host|IP:8443
JFrog Docker Access method: Port
User Name: "Provide a valid username"
Password: "Provide a valid password"
Filter: "Specify a valid filter"

The Registry 8443 port is the SSL listening port on the reverse proxy.  As for the filter, you can specify wildcard '*' or image:tag (alpine:3.9). 

 

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020933
  • Creation Date: 18-Jan-2023
  • Modified Date:21-Sep-2023
    • SUSE NeuVector

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.