I’m looking for a suggestion for a good way to access a container that is based off an image without a network service, since i’m using docker-compose the containers only talk to one another via network and the container i need just runs a shell script.
Ideas? should i really be considering adding a webserver with my code to just to access a shell script between containers?
Sorry for my misunderstanding.
If you start both containers from the same compose file they automatically share a private network and can connect to each other using the service names you gave them in the compose file. Next you need something on container A that listens for commands. This could be an application, or you could install a ssh server and call the script directly from container B. Like this all is completely isolated from the host.
It’s not your fault i’m bad at explaining things…
That’s pretty much what i thought\found, either app or ssh but since my main container is running from a webserver with php i don’t think ssh will work out well at that level.
right now i’ve added apache to the other container so it seems to be ok but i thought maybe there’s a better solution for this.
This is similar to gunicorn in python etc.
I might just take this over python or node.js in production, any of them needs stuff to be installed on the container.
But for now i chose php since i need it to have a page rather than an api call.