Skip to content
Advertisement

Is distributing python source code in Docker secure?

I am about to decide on programming language for the project. The requirements are that some of customers want to run application on isolated servers without external internet access.

To do that I need to distribute application to them and cannot use SaaS approach running on, for example, my cloud (what I’d prefer to do…).

The problem is that if I decide to use Python for developing this, I would need to provide customer with easy readable code which is not really what I’d like to do (of course, I know about all that “do you really need to protect your source code” kind of questions but it’s out of scope for now).

One of my colleagues told me about Docker. I can find dozen of answers about Docker container security. Problem is all that is about protecting (isolating) host from code running in container.

What I need is to know if the Python source code in the Docker Image and running in Docker Container is secured from access – can user in some way (doesn’t need to be easy) access that Python code?

I know I can’t protect everything, I know it is possible to decompile/crack everything. I just want to know the answer just to decide whether the way to access my code inside Docker is hard enough that I can take the risk.

Advertisement

Answer

Docker images are an open and documented “application packaging” format. There are countless ways to inspect the image contents, including all of the python source code shipped inside of them.

Running applications inside of a container provides isolation from the application escaping the container to access the host. They do not protect you from users on the host inspecting what is occurring inside of the container.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement