csdreamdong
V2EX  ›  问与答

如果一个平台提供自动根据 Dockerfile 构建 docker 容器。那么它有安全隐患么?

  •  
  •   csdreamdong · Jun 30, 2017 · 2671 views
    This topic created in 3256 days ago, the information mentioned may be changed or developed.

    一直都没研究过。Dockerfile 的构建原理。

    是物理机上,运行 Dockerfile 里的 RUN 么?

    如果我在 Dockerfile 里 RUN shutdown -h now。会怎样?

    6 replies    2017-06-30 13:04:34 +08:00
    402645707
        1
    402645707  
       Jun 30, 2017 via Android
    docker 是多个容器共用一个精简 linux 内核
    run 也是启动时在容器中运行
    除非特殊情况,容器系统不会影响宿主系统
    会提示
    sh:shutdown not found
    oott123
        2
    oott123  
       Jun 30, 2017
    有和提供 Docker 容器托管差不多的安全隐患。
    Dockerfile 里的指令,都是在容器里执行的。
    0x0
        3
    0x0  
       Jun 30, 2017
    如果没配置好有很大安全隐患。容器可以挂载宿主机目录搞事情。
    见[攻击容器集群管理平台]( https://0x0d.im/archives/attack-container-management-platform.html)
    mrgeneral
        4
    mrgeneral  
       Jun 30, 2017
    https://cloud.docker.com/ 不就是干这个的么? 帮你把 Dockerfile build 成一个镜像,这么大的平台了,也没出啥事
    cloverstd
        5
    cloverstd  
       Jun 30, 2017
    docker 的原理是给你运行一个容器,在里面执行你的 run,然后再把你的容器 commit
    zoues
        6
    zoues  
       Jun 30, 2017 via iPhone
    看看 clariy
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2836 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 14:42 · PVG 22:42 · LAX 07:42 · JFK 10:42
    ♥ Do have faith in what you're doing.