Protecting docker filesystem access

情到浓时终转凉″ 提交于 2019-12-08 03:30:34

问题


We use docker during development and everything works well. Our software is written in PHP and dockerized with MySQL, Apache and a lot of frameworks and libraries.

For some of our customers we want to ship docker images in order to let them test, evaluate and use it. Using docker images they just need tun run the container and get a fully installed and configured system - very easy!

But: How can we avoid customers seeing our code by simply attaching to docker or making some execs inside the containers?

Are there techniques to completely lock down every kind of access to the filesystem inside a container? We just like to get access via ssh to our software.


回答1:


It is possible to override almost everything about the construction of an image at runtime using the docker run command. So they wouldn't even need to do exec, they could just override cmd or entrypoint to bash or whatever. Anytime a customer has your code (even compiled / encrypted / etc...) they have your code. If this is really a big deal, think about a SaaS model.



来源:https://stackoverflow.com/questions/38687121/protecting-docker-filesystem-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!