Windows docker desktop 如何添加入口点或命令

huangapple go评论91阅读模式
英文:

Windows docker desktop how to add an entry point or command

问题

我想在Windows Docker桌面上运行一个带有入口命令"/bin/bash"的容器,就像我从命令行运行"docker run -it <image_name> /bin/bash"一样。我该怎么做?

英文:

Windows docker desktop 如何添加入口点或命令

I want to run a container with an entry command of '/bin/bash' in above the windows docker desktop , just like as if I run "docker run -it <image_name> /bin/bash" from command line.

How can I do it?

答案1

得分: 0

你可以从Docker Desktop中启动容器。然后使用docker ps找出容器ID,然后像这样进入容器:docker exec -it <container_id> /bin/bash,如果这是你想要的话。

然而,ENTRYPOINT是Dockerfile的一个属性。你不能通过DD UI来操作它。

英文:

You can spin up the container from Docker Desktop. Then find out the container ID using docker ps and enter the container like so: docker exec -it &lt;container_id&gt; /bin/bash if that's what you desire.

However, ENTRYPOINT is a property of a Dockerfile. You can't work with it via the DD UI.

huangapple
  • 本文由 发表于 2023年7月5日 00:21:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76614427.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定