0

I am working on a project and to show the demo of project the code has to be pushed into sever of the third party, but my code has to be protected so that other users in the system cannot access or modify my code. The code runs on docker, so is there anyways to protect my docker file from other users within the system?

Amitha Mohanan
  • 301
  • 4
  • 9
  • Anyone who can `docker run` the image can very easily get the contents of its filesystem out; there is no way to limit or protect this. If protecting the application's source code is important, you need to make sure it's not in the image, which typically means using a compiled language (Go, Rust, C, C++, something JVM-based). – David Maze Mar 23 '21 at 11:22

1 Answers1

0

If you have your Dockerfile in the same repo as the source code of your project, you could allow read-only access to your third-party users. If the third party is allowed to commit in the project, then in order to protect the Dockerfile you will have to add the Dockerfile in a separate repo in which the third party does not have access to commit. Assuming it is git-based repo, there is no way to specify access permission for specific files.

naimdjon
  • 3,162
  • 1
  • 20
  • 41