search

Home  >  Q&A  >  body text

进入docker容器修改文件

有什么命令可以进入docker相关的容器修改文件,例如一个“wo”的容器来说,我docker run的参数docker run --privileged=true --rm=true --name=wo --net=bridge -v /var/docker_backup/log/wo/:/var/edo/wo/logs/ -v /var/docker_backup/frscache/:/var/frscache/ -v /var/docker_backup/tmp/:/tmp/ -v /var/docker_files/frs/:/var/frs/ -v /var/docker_files/cache/:/var/edo/cache/ -e NLS_LANG=american_america.AL32UTF8 -e DB_NAME=zodb -e EDO_OPERATOR=0 -e SERVICE_ID=edodocs -e EDO_QUEUE=0 -e ETCD_PORT_4001_TCP=tcp://172.17.42.1:4001 -e EDO_VENDOR=standalone -p 8001:80 xx.xx.xx.xx:5000/wo start

PHP中文网PHP中文网2774 days ago820

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-24 16:01:11

    sudo docker exec -it wo bash

    reply
    0
  • 漂亮男人

    漂亮男人2017-04-24 16:01:11

    Such a complicated command. . I felt dizzy just looking at it.
    In addition to the exec mentioned above, there are also nsenter and ssh. Recommend nsenter.

    reply
    0
  • Cancelreply