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?
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.
When the download is complete, you can run this command to verify and find the container image name.
docker images
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. ?
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
Congratulations! The image is now loaded on the offline computer! ?
Berikut jadwal imsak dan buka puasa Ramadhan 2025 di Kota Serang dari tanggal 1 Ramadhan -…
Jakarta - Pemerintah telah menetapkan awal Ramadan 2025 berdasarkan hasil sidang isbat oleh Kemenag. Begitu pula dengan organisasi masyarakat…
Siapa sangka, salah satu warganet justru mendapat informasi tak terduga yang berasal dari Meta AI.…
Ketika menjalani rutinitas sehari-hari tentu saja kamu pernah merasa suntuk atau jenuh. Supaya kamu bisa…
Sebuah kapal kargo komersial China diduga sengaja menyeret jangkarnya untuk memotong kabel bawah laut yang…
Nabi Sulaiman dikenal sebagai raja yang kaya raya. Para ilmuwan arkeologi kini mengungkap apa sumber kekayaannya,…