How to run docker-compose entrypoint configuration option with multiple or multiline bash commands
commands:
yarn install
yarn build
sleep infinity
How to run docker-compose entrypoint configuration option with multiple or multiline bash commands
commands:
yarn install
yarn build
sleep infinity
I figured out how!
Steps:
docker-compose.yml, say for service:gvhservice, add below lines of codeentrypoint.shWhere in
entrypoint.sh, add below lines of code:where in
docker-compose.yml, add below lines of code:ENTRYPOINTinstruction within the container andcommandinstruction and operator|configuration option indocker-compose.yml(suitable for a variable number of commands to be passed during runtime)build you container with instruction:
COPY entrypoint.sh .andwhere contents of
entrypoint.shis:where in
docker-compose.yml, add below lines of code