You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stack image container command do not copy the data files.
I use stack image container to try to build a docker image.
But stack only copy the binary without datafile.
For example:
My stack.yaml includes:
image:
containers:
- name: 'test'base: debian
Then I run stack image container.
After the image built, I run docker run -it test, and run my app in container.
But I get:
root@81d31e691b57:/usr/local# fluffy 300 port=10
/home/qinka/fluffy-engine/.stack-work/install/x86_64-linux-nopie/nightly-2017-11-13/8.2.1/share/x86_64-linux-ghc-8.2.1/fluffy-0.1.0.0
fluffy: /home/qinka/fluffy-engine/.stack-work/install/x86_64-linux-nopie/nightly-2017-11-13/8.2.1/share/x86_64-linux-ghc-8.2.1/fluffy-0.1.0.0: getDirectoryContents:openDirStream: does not exist (No such file or directory)
(And the data files are not copied to the right location)
The text was updated successfully, but these errors were encountered:
Hmm, this is related to the problem of supporting uninstallation, these are hard for the same reason - see #361.
Could potentially copy all files in the resulting bin dir, instead of being selective. May be feasible to handle stuff that's properly declared via data-files in the cabal file. Not sure if that'd cover your case.
How about writing a script that builds a docker image that contains the data files, based on the results of stack image container? I realize that's a bit inconvenient, but unfortunately stack does not always have the requisite info to locate data files. Handling it at least for data-files would be nice, though.
Also potentially related to supporting --prefix (#848), since otherwise the data files would need to be in exactly the same filesystem location in the image as it was built on the host.
The
stack image container
command do not copy the data files.I use
stack image container
to try to build a docker image.But stack only copy the binary without datafile.
For example:
My stack.yaml includes:
Then I run
stack image container
.After the image built, I run
docker run -it test
, and run my app in container.But I get:
(And the data files are not copied to the right location)
The text was updated successfully, but these errors were encountered: