Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute some bash script before docker-compose build triggered by command

Is there a way before building of docker containers with docker compose to execute a bash script?

something like

version: "3"
before_script: //execute my local script 
services:
  database: ....
like image 289
fefe Avatar asked Oct 22 '18 14:10

fefe


Video Answer


1 Answers

No there is not.

you can make a custom bash build script that executes your local script before starting the containers

like image 76
Michael Barany Avatar answered Oct 25 '22 17:10

Michael Barany