/Docker_Unix_Socket

Docker container sending messages to the host computer over Unix domain socket connection

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Docker with Unix Sockets

This is a minimal working example of a Docker container sending messages to the host computer over a Unix socket connection.

After installing Docker, build the Docker image with the following commands, where <name> is the name of the container.

docker build -t <name> .

Start the Python server on the host machine with the following command.

python3 server.py

While the server.py Python process is running, run client.py in the Docker image with the following command, where <image> is the image ID.

docker run -v /tmp:/tmp <image>