Home > OS >  How to pull a docker image from a github post
How to pull a docker image from a github post

Time:05-26

I was following along with an article and I am pretty confused on how to convert this https://github.com/jpetazzo/nsenter to a docker container or image?? I am pretty confused and the article assumed as if I knew how to do it?

CodePudding user response:

You could download the Dockerfile and then run docker build . in the directory that you save the Dockerfile to. That will create a Docker image, which you can build a container based off of.

CodePudding user response:

Here is two possible ways:

  1. Build image locally:
git clone [email protected]:jpetazzo/nsenter.git
cd nsenter
docker build -t nsenter_image .
docker run --name nsenter_container --rm nsenter_image cat /nsenter > ./nsenter && chmod  x ./nsenter
ls -l nsenter
  1. Use docker HUB image:
mkdir nsenter
cd nsenter
docker run --name nsenter_container --rm jpetazzo/nsenter cat /nsenter > ./nsenter && chmod  x ./nsenter
ls -l nsenter
  • Related