As far as I understood docker and docker-compose the flow is like that: Dockerfile –build–> Docker Image –create–> Docker Container #1 –create–> Docker Container #2 –create–> … –create–> Docker Container #n So the Image is made by the commands in the Dockerfile but is purely some sort of "offline" version. You can bring it "online" ..
I would like to use docker-compose build docker-compose run backend pip3 install -r requirements.txt docker-compose up to create my docker container, install the requirements and start it then. Unfortunately it looks like run is creating a new intermediate container called something like container_run1 and up is not using this container, but the original one made ..
I would like to pass the variable $styled to a script inside a docker container. The docker command would look something like docker exec container_name "/bin/bash -c cd /where/the/script/is && ./echo.sh $styled" the echo.sh would look like this #!/bin/bash echo -e $1 the variable $styled contains escape characters, so lets say it is: styled=$’e[7mSOME_TEXTe[27m’ On ..