Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing parameter in docker build command with fish

Using Docker For Mac, fish shell, macOS 10.11

I am trying to run the following command: docker run -d -it --name=my-app-container -v $(pwd):/app -p 3000:3000 myapp

I get the following error:

$(...) is not supported. In fish, please use '(pwd)'.
fish: docker run -d -it --name=my-app-container -v $(pwd):/app -p 3000:3000 myapp

Been reading through repos and SO answers but cant get this to work. Any ideas? Thank you.

like image 751
armand Avatar asked May 14 '26 08:05

armand


1 Answers

The equivalent of bash $(command) in fish is just (command)

So all you need to do is remove the dollar sign.

docker run -d -it --name=my-app-cont -v (pwd):/app -p 3000:3000 myapp
like image 169
NetanelRabinowitz Avatar answered May 16 '26 09:05

NetanelRabinowitz