I have docker compose like
volumes:
- ./:/app
and dockerfile like
WORKDIR /app
CMD [ "npm", "run", "build"]
It working but i don't know somecase it don't work?. If volume mounted before CMD run, it will working but i don't know is that true?. I don't want copy file in docker file and if volume mounted before CMD run that sound good. Anybody know Is volume mounted before running CMD? (more: is that same with command in composer?) any document refer thanks.
Yes, volume is mounted before CMD
is run.
This is covered in the OCI runtime spec with the "mount operations" before the runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With