docker with makefile volume mounts

Viewed 575

So recently came across this weird case where I am trying to access file in my local dir into my container. When I run the following command on terminal it runs fine and shows the expected list of file

docker run -it --rm -v $(pwd):/mnt/data -w /mnt/data-sink artprod.dev.abc.com/org/cli ls

But when I try to run this via makefile it shows nothing,(I run make in the same path where I run the docker cmd in the previous step)

docker-publish: build
    echo "Publishing $(APP_NAME) snapshot $(VERSION)"
    docker run -it --rm -v $(pwd):/mnt/data -w /mnt/data-sink artprod.dev.abc.com/org/cli ls
1 Answers

$(shell pwd) worked simply $(pwd) in make didnt do the shell interpolation.

Related