commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.99k stars 844 forks source link

Docker: mount path must be absolute. #2324

Open Pitometsu opened 8 years ago

Pitometsu commented 8 years ago

How can I specify mount point for docker in stack.yaml for file in current user $HOME without hardcoding full path? Or generate mount points by script like bash? https://github.com/commercialhaskell/stack/issues/2125

Pitometsu commented 8 years ago

Would be nice to have some preprocess language, e.g. ability to script on bash in stack.yaml.

sjakobi commented 8 years ago

How can I specify mount point for docker in stack.yaml for file in current user $HOME without hardcoding full path?

That idea is tracked in https://github.com/commercialhaskell/stack/issues/1375.

Would be nice to have some preprocess language, e.g. ability to script on bash in stack.yaml.

I think that idea is not so compatible with the goal of keeping the stack.yaml format simple. It also sounds like it would make the configuration less reproducible

But I think that stack config set could be used to this.

Pitometsu commented 8 years ago

@sjakobi, thank you for response

But I think that stack config set could be used to this.

 $ stack config set extra-deps "[ipprint-0.6, sr-extra-1.46.3.2]"
stack: parse stack config set field: only set resolver is implemented
sjakobi commented 8 years ago

$ stack config set extra-deps "[ipprint-0.6, sr-extra-1.46.3.2]" stack: parse stack config set field: only set resolver is implemented

Yeah, stack config set currently has only very rudimentary functionality.

115 contains a general discussion of the stack config command, so I guess that's the right place for discussing the syntax for the extension that you would like.

I'm afraid I'm not really familiar with docker and stack's docker integration, so maybe you can give a more concrete example of the functionality that you need?

Pitometsu commented 8 years ago

Just ability to create symlinks more flexable, depend on host environment without path hardcoding. And stack config nice feature, would be glad to use described functionality when it will be implemented just as described in issue above. Thanks.