How run docker images without connect to Internet?

前端 未结 2 1346
北海茫月
北海茫月 2020-12-29 07:06

I have installed docker in a system which has no connection to Internet so to run an image with docker, I had to download a simple image from this

2条回答
  •  不知归路
    2020-12-29 07:44

    You are trying to start a container using the dockerfile. You need to first build the image from dockerfile. You can do this via

    docker build -t < image name > < path >

    You will require the internet connection while building the image.

    You can check the image in your system using

    docker images

    Once you build the docker image you can start the container without internet connection using

    docker run < image name >

    Also you can export the same image using docker save and docker load functionalities.

提交回复
热议问题