[英]How to pull a docker image from a github post
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??我正在关注一篇文章,我很困惑如何将此https://github.com/jpetazzo/nsenter转换为 docker 容器或图像? I am pretty confused and the article assumed as if I knew how to do it?
我很困惑,文章假设我知道该怎么做?
You could download the Dockerfile and then run docker build .
您可以下载 Dockerfile,然后运行 docker
docker build .
in the directory that you save the Dockerfile to.在保存 Dockerfile 的目录中。 That will create a Docker image, which you can build a container based off of.
这将创建一个 Docker 映像,您可以基于该映像构建一个容器。
Here is two possible ways:这里有两种可能的方式:
git clone git@github.com: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
mkdir nsenter
cd nsenter
docker run --name nsenter_container --rm jpetazzo/nsenter cat /nsenter > ./nsenter && chmod +x ./nsenter
ls -l nsenter
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.