Skip to content

Instantly share code, notes, and snippets.

@jalallinux
Last active January 28, 2026 08:38
Show Gist options
  • Select an option

  • Save jalallinux/bb0370d5944b25c999807e94b5fc844b to your computer and use it in GitHub Desktop.

Select an option

Save jalallinux/bb0370d5944b25c999807e94b5fc844b to your computer and use it in GitHub Desktop.
Sonatype Nexus

Nexus Panel

1. Create Repository

Menu Path

Settings -> Repository -> Repositories -> Create repository
image

2. Fill form

Inputs

Name: * (docker-proxy)
Remote storage: Location of the remote repository (https://repo.packagist.org)
Maximum metadata age (in minute): 1 week (7*24*60=10080)
Blob store: Make blob and select that befor create this.

In Php project

1. /auth.json cross composer.json file

{
    "http-basic": {
        "localhost": {
            "username": "php",
            "password": "php"
        }
    }
}

2. /composer.json

"repositories": [
    {
       "type": "composer",
       "url": "http://localhost:8081/repository/composer-proxy/"
    }
]

3. Set if on http composer.json

"config": {
    "secure-http": false,
},

4. Remove composer.lock

5. Remove composer cache composer clear-cache

6. Run Composer install composer install

Nexus Panel

1. Create Repository

Menu Path

Settings -> Repository -> Repositories -> Create repository
Screenshot from 2026-01-28 09-47-28

2. Select type

Type

Proxy: As Cache and proxy to docker registery.
Hosted: As Private docker registery.
Group: As both of Proxy and Hosted type.
Screenshot from 2026-01-28 09-49-18

3. Fill form

Inputs

Name: * (docker-hosted)
Other Connectors: Http and Https port (8083)
Enable Docker V1 API: enable
Blob store: Make blob and select that befor create this. (same with proxy)

Ubuntu server/desktop

1. Set as insecure registery if use Http

sudo nano /etc/docker/daemon.json

Content of /etc/docker/daemon.json

{
  "insecure-registries": [
    "192.168.30.235:8083" // 8083 is Http connector port of docker-hosted
  ]
}

2. Login to nexus docker registry

docker login -u username -p password 192.168.30.235:8083

3. Pull first docker image

docker push 192.168.30.235:8083/postgres:16

Nexus Panel

1. Create Repository

Menu Path

Settings -> Repository -> Repositories -> Create repository
Screenshot from 2026-01-28 09-47-28

2. Select type

Type

Proxy: As Cache and proxy to docker registery.
Hosted: As Private docker registery.
Group: As both of Proxy and Hosted type.
Screenshot from 2026-01-28 09-49-18

3. Fill form

Inputs

Name: * (docker-proxy)
Other Connectors: Http and Https port (8082)
Enable Docker V1 API: enable
Remote storage: Location of the remote repository (https://registry-1.docker.io)
Docker Index: If use https://registry-1.docker.io set Use Docker Hub
Blob store: Make blob and select that befor create this. (same with hosted)
Maximum metadata age (in minute): 1 week (7*24*60=10080)

Ubuntu server/desktop

1. Set as insecure registery if use Http

sudo nano /etc/docker/daemon.json

Content of /etc/docker/daemon.json

{
  "insecure-registries": [
    "192.168.30.235:8082" // 8082 is Http connector port of docker-proxy
  ]
}

2. Login to nexus docker registry

docker login -u username -p password 192.168.30.235:8082

3. Pull first docker image

docker pull 192.168.30.235:8082/postgres:16

Nexus Panel

1. Create Repository

Menu Path

Settings -> Repository -> Repositories -> Create repository
Screenshot from 2026-01-28 12-06-06

2. Fill form

Inputs

Name: * (docker-proxy)
Remote storage: Location of the remote repository ([https://repo.packagist.or](https://registry.npmjs.org)
Maximum metadata age (in minute): 1 week (7*24*60=10080)
Blob store: Make blob and select that befor create this.

In Node project

1. /.yarnrc

registry "http://192.168.30.235:8081/repository/npm-proxy"

4. Remove yarn.lock

5. Run Composer install yarn

1. Create Developer User Account

Menu Path

Settings -> Security -> Users -> Create local user
Screenshot from 2026-01-28 10-08-09

Inputs

ID: * (developer)
First name: * (developer)
Last name: * (developer)
Email: * (developer)
Password: * (developer)
Confirm Password: * (developer)
Status: Active
Roles: [nx-anonymous]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment