I have client-server application in a docker-compose file that is running in docker-swarm. Both the client and the server are publishing a port, that allows accessing the application in the browser.
version: '3.7'
services:
client:
image: phalanx8/user_enum_openssh-client
ports:
- "0.0.0.0:8888:8080"
networks:
- main_network
server:
image: phalanx8/user_enum_openssh-server
ports:
- "0.0.0.0:8081:8080"
networks:
- main_network
networks:
main_network:
My goes is that every time a request was made, a client-server application should be replicated. So every user is getting their own environment.
Replicating each service (client/server) with docker service service_name_(client/server)=X
doesn't work because the network isn't replicated too.
My idea was to copy the docker-compose.yml
at every request, which I think isn't a smooth solution.
Is there a better way? Am I missing something in the docker-swarm configuration? Does Kubernetes provide a solution for this? I cant find anything.