Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Docker pull fails behind Apache

I have a custom Docker registry, accessible through http://localhost:5000

Here is the Apache config:

Listen 443
<VirtualHost *:443>
    ServerName registry.mycompany.com

    SSLEngine on
    SSLCertificateFile    ...
    SSLCertificateKeyFile ...
    SSLCACertificateFile  /etc/pki/tls/certs/thawte.pem

    ProxyPreserveHost On
    ProxyPass         / http://localhost:5000/
    ProxyPassReverse  / http://localhost:5000/
    ProxyRequests     Off
</VirtualHost>

And here how I start the registry:

docker run -d \
    -p 5000:5000 \
    -e REGISTRY_STORAGE_DELETE_ENABLED=true \
    -e REGISTRY_AUTH=htpasswd \
    -e REGISTRY_AUTH_HTPASSWD_REALM="Registro" \
    -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
    --restart=always \
    --name registro \
    registry:2

Everything works ok (docker pull, ...), but docker push fails. After some retrying here is the error message shown:

first path segment in URL cannot contain colon

Related doc can be found here:

  • https://www.devco.net/archives/2015/01/21/running-a-secure-docker-registry-behind-apache.php
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

With docker compose, I use the image jwilder/nginx-proxy:alpine as a proxy, and it works much better

version: "3.7"
services:
  registry:
    image: registry:2
    expose:
    - 5000
    volumes:
    - "./registry.yaml:/etc/docker/registry/config.yml"
    - "./img:/var/lib/registry"
    - "./certs:/certs"
    - "./auth:/auth"
    environment:
      VIRTUAL_HOST: registry.company.com
    restart: always
  gui:
    image: joxit/docker-registry-ui:static
    environment:
      URL: https://registry.company.com
      REGISTRY_TITLE: Company Docker registry
      DELETE_IMAGES: "true"
      VIRTUAL_HOST: gui-registry.company.com
      #HTTPS_METHOD: nohttps
    expose:
    - 80
  proxy:
    image: jwilder/nginx-proxy:alpine
    ports:
      - 80:80
      - 443:443
    volumes:
    - "/var/run/docker.sock:/tmp/docker.sock:ro"
    - "./certs:/etc/nginx/certs"
    - "./registry.conf:/etc/nginx/vhost.d/registro.fccma.com"
    - "./cors.conf:/etc/nginx/vhost.d/registro.fccma.com_location"
    environment:
      DEFAULT_HOST: registro.fccma.com

In this way, I can have the Docker registry and its corresponding GUI in the same host.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!