When the client's network is sealed, the image travels as a file
docker save and docker load will carry a build across an air gap, but what decides success is putting the approval gate in the right place.
In brief
- At a client site, the pipeline should stop at continuous delivery: packaging is automated, but a person approves the release before it reaches production.
- When the network is fully cut off, the image is exported as a tar file on a connected machine, carried inside and loaded with docker load.
- Without an internal registry, every host needs its own copy of the image; with one, the registry becomes the single point of distribution.
Your pipeline is green, the image is sitting in the registry, and then the client’s operations engineer sends one line: the servers on this side cannot reach the internet. The familiar build → push → pull chain breaks at its final link.
This is routine when deploying for a bank or a factory with an isolated internal network. GitLab’s offline documentation states plainly that its guidance is for networks that are physically disconnected. In places like that, there is no proxy to request and no firewall exception to negotiate.
This guide rebuilds that final link on a laptop: pack the image into a file, carry it into the isolated network, load it again inside, and put an approval gate in the right place. By the end, you have a process you can take with you to a client site.
What you will build, and what you need
The end product is a four-step process: build the image on a connected machine, export it to a tar file, move that file into the client’s network, then load it into a Docker daemon or an internal registry. You will simulate “carrying it inside” by deleting the image from your machine and loading it again from the file.
You need Docker installed, any image to experiment with (the image for the application you are working on is best), and a GitHub repository if you want to try the runner section. No cluster is required.
The approach works because of what containers are. According to Docker, a container packages code together with everything it depends on, so the application runs the same way whatever infrastructure sits underneath.
When you are not allowed to install anything from the internet on the client side, having everything already inside the image stops being a convenience and becomes a hard requirement.
Step 1: Where should the pipeline stop?
IBM separates two ideas that are often merged into one. Continuous delivery automates packaging and handover once a change has passed integration testing. Continuous deployment goes further: every approved change goes to production on its own, with no one intervening.
At a client site, especially one cut off from the internet, you almost always stop at continuous delivery. Automate everything up to a clean, clearly versioned artifact. Putting that artifact into production is a decision someone signs, usually someone on the client side.
The check after this step is simple: you can point to exactly one place in the process where someone has to approve, and you know that person’s name.
Step 2: Pack the image into a tar file
GitLab’s offline procedure begins by packaging Docker images as tar files. Elastic uses the same pattern for offline installations of Elastic Cloud Enterprise: run docker save -o on a connected machine, with the tar file named after the image’s version number.
Applied to your own application, the file name should carry the image’s exact version. The example below uses a placeholder name:
docker save -o myapp.1.0.0.tar myapp:1.0.0
Check: the tar file appears in the directory and its size is in line with the image. A small but important detail is to put the version in both the tag and the file name. On the inside, the operator sees only the file name, not your commit history.
Step 3: Carry it into the isolated network and load it
GitLab describes how these tar files can be moved elsewhere and then loaded into a Docker daemon. On a laptop, you simulate this by deleting the local image and loading it again from the file. The syntax below is the common form; compare it with docker load --help on your machine:
docker load -i myapp.1.0.0.tar
Check: the myapp:1.0.0 image reappears in the image list, and the container starts without the machine pulling anything from the network. To be more certain, turn off Wi-Fi before running the container. If it still comes up, your image genuinely does not depend on the network.
Step 4: Load onto each host, or into a registry?
This is the architectural decision many engineers discover only once they are standing at the client site. Elastic notes that without a private registry, you have to get the images onto each host individually. GitLab ends its procedure by loading the images into an offline registry, so the internal registry becomes the point of distribution.
Take a hypothetical client with four hosts running the application. Without a registry, every release means copying the tar file onto all four machines and running docker load four times. Miss one machine and the four hosts are running two different versions. With an internal registry, you load once, and all four hosts pull from a single source.
| Aspect | No internal registry | Offline registry |
|---|---|---|
| Loads per release | One per host | One, into the registry |
| Risk of version drift | High, easy to miss a host | Low, a single source |
| Suits | Few hosts, early trials | Many hosts, regular releases |
With the registry option, the workflow inside the client’s network usually comes down to three operations: load the tar file onto a staging machine, retag it with the internal registry’s address, then push it.
The example below is simplified, and the address registry.internal:5000 is a placeholder; check docker tag --help and docker push --help, and ask the client for the real registry’s address and authentication method:
# On a staging machine inside the client's network (simplified)
docker load -i myapp.1.0.0.tar
docker tag myapp:1.0.0 registry.internal:5000/myapp:1.0.0
docker push registry.internal:5000/myapp:1.0.0
After that, each host only needs to pull the image from the internal registry instead of receiving its own tar file:
# On each host (simplified)
docker pull registry.internal:5000/myapp:1.0.0
Check: all four hosts report the same 1.0.0 tag when you list images, and none of them needs the tar file on its own disk. One piece of advice: at the first working session, ask straight away whether the client has an internal registry. The answer determines how you write the runbook.
When should the runner sit inside the client’s network?
Not every site is fully cut off. At some, internal machines can still call out to certain services. In that case, GitHub Actions lets you host runners on your own machines and customize the environment that runs jobs, so a job can run on a machine already inside the client’s network while the workflow is still managed in the repository.
The skeleton below is simplified to illustrate the idea and is not a complete configuration. Check the syntax against the GitHub Actions documentation before using it:
# Simplified: job runs on a self-hosted runner inside the client's network
jobs:
load-release:
runs-on: self-hosted
steps:
- run: docker load -i myapp.1.0.0.tar
On a physically disconnected network, the runner cannot reach GitHub either, so you are back to the path described in steps 2 and 3.
Common mistakes
The first mistake is using the latest tag. Once the tar file has been carried into the isolated network, nobody has any way of telling how this week’s latest differs from last week’s. Always use a specific version.
The second is an image that still depends on the network: on startup, the container downloads extra models, packages or fonts from the internet. The Wi-Fi-off test in step 3 exists to catch this, and it should run before you leave for the airport, not after.
The third is forgetting a host. If the client has no registry, write the list of hosts into the runbook and tick off each machine once it is loaded.
How to put this skill on your CV
When reading FDE job descriptions, look for words such as “on-prem”, “air-gapped”, “customer environment” or “self-hosted”. They are a fairly clear sign that the company sells into places where the process above is far from theoretical.
On your CV, do not just write “experience with CI/CD”. Describe a specific occasion: what you packaged, where you moved it, how you loaded it, and how you verified it afterwards. A story like that proves something a list of tools cannot: that you have got software running on infrastructure outside your control.
The most elegant pipeline on GitHub is worth something only when the build runs on the client’s machines. At sites with no internet, a correctly named tar file, a list of hosts and someone to sign off often decide success more than any YAML file.
Was this article useful?
Thanks for the feedback!