Sign inSign up

tweag/stack-docker-nix

By tweag

Updated over 7 years ago

Docker+Nix image for use with Stack.

Image
1

1.8K

tweag/stack-docker-nix repository overview

Provision Haskell Stack Docker images using Nix

This is a Docker image suitable for use with Stack. It uses a shell.nix file for specifying what software packages to provision, so that stack --nix (see here) and stack --docker (see here) use the same specification.

To use this as a base image, add the following to your Dockerfile:

FROM tweag/stack-docker-nix

ADD shell.nix /
# Clean up non-essential downloaded archives after provisioning a shell.
RUN nix-shell /shell.nix --indirect --add-root /nix-shell-gc-root \
    && nix-collect-garbage
RUN IN_NIX_SHELL=1 nix-instantiate \
    --add-root /shell.drv --indirect /shell.nix \
    && nix-collect-garbage

New versions of this image are pushed to DockerHub every time the master branch is updated.

License

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

See the CC0 public domain dedication for more information.

Tag summary

Content type

Image

Digest

Size

195.9 MB

Last updated

over 7 years ago

docker pull tweag/stack-docker-nix