Gitlab offline docker images

I am using gitlab offline in a protected environment.

My noob question is: how to go about pulling down docker images inside the pipelines when the docker hub is not connected?

If I want to make a GET call to one of the internal URLs, I will need curl. What will need to do for this to get it working?

I can download curl from docker and put that image into the offline protected environment but how do I go about pulling it for use within the CICD pipeline?

Any feedback will be appreciated!! Thanks, heaps

Essentially you’ll need to docker pull all the images on a internet-connected machine, save them, copy/import them to a docker container registry running in your offline environment.

You can use the docs here as a reference:

For details on saving and transporting Docker images as a file, see Docker’s documentation on docker save , docker load , docker export , and docker import .

Thanks heap I will explore that. Cheers

I was wondering whether the following is possible:

  1. pull image e.g python image from artifactory using docker pull
  2. build the image using the docker file. The docker file’s first line will be: From Python:Latest

Will docker build pickup the python image from step 1?


You’d need to change the FROM part of your Dockerfile to point to the location inside your “offline” network.

For example, if you want to pull python:latest from offlineartifactory.lan instead of dockerhub, you’d want

FROM "offlineartifactory.lan/python:latest"

Note that running docker build in a truly “offline” environment will fail if the build job requires downloading external dependencies.

Awesome. Thank you

1 Like