Upload container images in offline environment

hi im trying to setup a container registry to upload images for my offline environment. At the moment im working on a test instance with internet access.
i have the problem that i dont know how to upload/push a container the correct way. i created the docker registry within an podman instance with

podman run -dt -p 5000:5000 --name=registry --volume /opt/container_registry:/var/lib/registry:rw registry:2

after that i edited the gitlab.rb file and added these two lines (ips are from a tialscale network):

registry_external_url ''
gitlab_rails['registry_api_url'] = ""
registry_nginx['redirect_http_to_https'] = false
registry_nginx['listen_port'] = 5678

i deactivated https because in this test environment i dont have certiticates.
Than i sucessfully loged in with podman login --tls-verify=false.
and now the problem started. i could sucessfully downloaded the latest alpine image for test, retagged it with podman image tag docker.io/library/alpine:latest and also upload it with podman image push --tls-verify=false. but the image didnt showed up in my gitlab instance :confused: i also tried to change the port from 5000 to 5678 and reverse but nothing worked, i dont see the image on my gitlab UI…
please help :frowning:

thanks in advance

what version of GitLab are you trying it with? AFAIK it works only with the built-in container registry now.

1 Like

im trying it on my 16.3.x version. self hosted omnibus ubuntu repository installation. i tried to follow the installation instruction from gitlab so i dont realy understand what you mean with built-in registry? because the instrcution on container registry adminsitration setup is in my opinion kind of confusing. at the top of the installation manual it describes the container setup and at the next moment it speaks about filesystem types like local or S3, so i also dont really know what instructions are now relevant for me…

You do not need to run Container registry yourself. GitLab comes with built-in container registry. You use parameters in gitlab.rb to configure this built-in container registry. You can check if it’s running using gitlab-ctl status. Container registry must use HTTPS, so you need to have SSL certificates ready. You can use the same as for your GitLab instance.

For your offline/air-gapped deployment you need to follow steps 1-3 from GitLab Container Registry administration | GitLab

1 Like