docker-eth-dev icon indicating copy to clipboard operation
docker-eth-dev copied to clipboard

Symlinked dapp under dapps fails to build

Open chatch opened this issue 7 years ago • 3 comments

Here smart-contracts is a symlink to a project:

/dev/docker-eth-dev/dapps/smart-contracts$ truffle test
ERROR: Cannot start service truffle: oci runtime error: container_linux.go:247: starting container process caused "chdir to cwd (\"/var/dapps/smart-contracts\") set in config.json failed: no such file or directory"

But if I copy the full project into dapps/ it runs okay.

chatch avatar Feb 27 '17 09:02 chatch

Ah I was just thinking about this problem. I'll look into a fix. (Ideas welcome)

gnidan avatar Feb 27 '17 14:02 gnidan

A couple of workarounds for this:

  • reverse the directory <--> symlink relationship. so just have the hard directory under dapps/ and symlink to it from where the directory originally was
  • add a line under 'volumes:' in the docker-compose.yml specifically for that dapp/ and re-build the image

I'm using the first one and it works fine so I'll just go with that I think.

After reading some issues of people with a simular problem I don't think there is any plan to change this at the docker volumes level ...

chatch avatar Feb 28 '17 03:02 chatch

This could also potentially be solved via helpers in the truffle wrapper bin, perhaps.

gnidan avatar Feb 28 '17 08:02 gnidan