Is distributing python source code in Docker secure?
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.
How to encrypt docker containers securely?
The short answer here is that there is not a generic method for securing the contents of your containers without encrypting the contents.
Since the nature of Docker is open, the main security with Docker images is controlling who can access the image (e.g. private image hosting), which depends on the security of your method of distribution.
However, you can encrypt the layers of your images using other tools, such as ocicrypt. There are efforts to modify the containerd used by Docker and for images whose layers are encrypted by ocicrypt.
Overview article:
https://developer.ibm.com/articles/encrypted-container-images-for-container-image-security-at-rest/
Code:
https://github.com/containerd/imgcrypt
https://github.com/containers/ocicrypt
Related Topics
How to Check If Type of a Variable Is String
Selecting a Row of Pandas Series/Dataframe by Integer Index
Why Does Python Print Unicode Characters When the Default Encoding Is Ascii
How to Choose Cross-Entropy Loss in Tensorflow
How to Get Rid of "Unnamed: 0" Column in a Pandas Dataframe Read in from CSV File
How to Remove Nan Values from a Numpy Array
How to See If There's an Available and Active Network Connection in Python
Read File from Line 2 or Skip Header Row
How to Decrypt Openssl Aes-Encrypted Files in Python
How to Count Occurrence of Unique Values Inside a List
Most Efficient Way of Making an If-Elif-Elif-Else Statement When the Else Is Done the Most
Using Django Time/Date Widgets in Custom Form
What Does -1 Mean in Numpy Reshape
How Are Glob.Glob()'s Return Values Ordered