The host has a server that listens on local host port 6969 and a client that accesses this port. Communication occurs via a socket.
How can communication between the client and server be implemented if the client is stuffed into a docker container? How to correctly configure port forwarding?
I created a simple dockerfile:
FROM gcc:latest
COPY ./src/client.c /home
WORKDIR /home
RUN gcc client.c && ./a.out
I collected the image and launched it with the command:
docker run -p 127.0.0.1:9697:9697 -it clientcont