英文:
Windows docker desktop how to add an entry point or command
问题
我想在Windows Docker桌面上运行一个带有入口命令"/bin/bash"的容器,就像我从命令行运行"docker run -it <image_name> /bin/bash"一样。我该怎么做?
英文:
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 <container_id> /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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论