Edukasi

How to load docker container images on offline computer

Some of our clients runs their servers behind a lot of security, often with no or restricted access to the public internet.

So how do you pull a container image from an online repository,
like 
Docker Hub, without internet?

Save the container image to a file

Let’s say we want to run the MongoDB database image on our offline server.
First we need to save the container image to a file, so that we can copy it to the offline server.

I’m assuming that you have docker installed on your online and offline computer.
If not, you must install 
docker before continuing!

Lets pull the image to out online computer first by running this command in your command line interface:

docker pull mongo

The above command will download the container image to your online computer.

Illustration to show the container image being pulled.

When the download is complete, you can run this command to verify and find the container image name.

docker images
Illustration to show that the container image is not loaded on the computer.

Now that we have the image, let’s save it to a file using the docker save command. The first line below is to show you the command buildup. The second line is a created example.

docker save -o <output path and filename> <docker image name:tag>docker save -o C:\Temp\mongo-containerimage.tar mongo:latest

Running the command might take some time, so be patient ?

When the command is done, you should see a container file created at the path you specified. ?

Load the image from file

Now to the part where you load the container image on the offline computer.
Firstly, you need to transfer the container file to the computer somehow.

After it has been transferred, we can now use the docker load command.
The first line below is to show you the command buildup. The second line is a created example.

docker load -i <path and filename>
docker load -i C:\Transfer\mongo-containerimage.tar

When the loading is complete, you can now run docker images to verify that it has been loaded.

docker images
Illustration image to show the load command, and that the container image has been loaded.

Congratulations! The image is now loaded on the offline computer! ?

ryan

Recent Posts

Jadwal Imsak dan Buka Puasa Ramadhan 2025 Kota Serang Selama Sebulan

Berikut jadwal imsak dan buka puasa Ramadhan 2025 di Kota Serang dari tanggal 1 Ramadhan -…

1 minggu ago

Jadwal Resmi Awal Puasa Ramadan 2025 Pemerintah, NU, Muhammadiyah

Jakarta - Pemerintah telah menetapkan awal Ramadan 2025 berdasarkan hasil sidang isbat oleh Kemenag. Begitu pula dengan organisasi masyarakat…

1 minggu ago

Meta AI Ditanya Luas Kebakaran Los Angeles, Hasilnya Mengejutkan Sama dengan Luas Gaza

Siapa sangka, salah satu warganet justru mendapat informasi tak terduga yang berasal dari Meta AI.…

2 bulan ago

Tebak-tebakan pelesetan kata ini lucu abis, awas ketawa ngakak

Ketika menjalani rutinitas sehari-hari tentu saja kamu pernah merasa suntuk atau jenuh. Supaya kamu bisa…

2 bulan ago

Kapal China Diduga Biang Kerok Internet Mati Total di Berbagai Negara

Sebuah kapal kargo komersial China diduga sengaja menyeret jangkarnya untuk memotong kabel bawah laut yang…

3 bulan ago

Ini Sumber Kekayaan Nabi Sulaiman, Sungguh di Luar Dugaan

Nabi Sulaiman dikenal sebagai raja yang kaya raya. Para ilmuwan arkeologi kini mengungkap apa sumber kekayaannya,…

3 bulan ago