Docker - s50600822/Notes GitHub Wiki

Docker setting:

for example when you need to disable K8S (set kubernetesEnabled --> false in settings.json)

cd /Users/hoaphan/Library/Group\ Containers/group.com.docker/

**It'd be cool if Docker had a non-blocking option to disable K8S so people can neutralize deadlock and reset their broken cluster **


There are two ways of configuring Docker to use another Docker Engine UNIX socket:

By setting the DOCKER_HOST environment variable to the other engine's socket path, like export DOCKER_HOST=unix:///var/run/docker.sock

By adding the other engine's socket path to the ~/.docker/config.json file under the unix:///path/to/other/docker.sock key.


The -privileged flag is a Docker flag that gives your container full access to the host machine's resources. This means that your container can access all of the host machine's CPU, memory, disk, and network resources.

In some cases, using the -privileged flag can improve performance. For example, if your container is running a CPU-intensive application, using the -privileged flag can give your container more CPU resources, which can improve performance.

However, it is important to note that the -privileged flag can also increase security risks. When you use the -privileged flag, your container is no longer isolated from the host machine. This means that your container can access all of the host machine's resources, including files, processes, and network connections.

As a result, you should only use the -privileged flag if you need to. If you are not sure whether or not you need to use the -privileged flag, you should consult with a security expert.

Here are some examples of when you might need to use the -privileged flag:

If you are running a container that needs to access the host machine's hardware, such as a GPU or a network card. If you are running a container that needs to make changes to the host machine's filesystem. If you are running a container that needs to run as root. If you are not sure whether or not you need to use the -privileged flag, you should consult with a security expert.


Resources

https://drive.google.com/drive/folders/1CJMjjT5Xlga7ti9M9twHQM68ctuX9VJq

https://github.com/argoproj/argo-cd/pull/8831