Docker how to pass a relative path as an argument

I can’t use -v because this container will be used as a build step in a CI/CD pipeline and as I understand it, it is just run as is.

Using -v to expose your current directory is the only way to make that .deploy/mup.js file inside your container, unless you are baking it into the image itself using a COPY directive in your Dockerfile.

Using the -v option to map a host directory might look something like this:

docker run \
  -v $PWD/.deploy:/data/.deploy \
  -w /data \
  docker-mup deploy --config .deploy/mup.js

This would map (using -v ...) the $PWD/.deploy directory onto /data/.deploy in your container, set the current working directory to /data (using -w ...), and then run deploy --config .deploy/mup.js.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)