Add docker files to run nix dev environment on Windows

This commit is contained in:
Wolfgang Walther
2020-12-01 00:42:21 +01:00
committed by Wolfgang Walther
parent f2cb91740e
commit 1a5f6cce46
3 changed files with 39 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# This Dockerfile is only used as a development environment for
# non-nix systems, i.e. Windows.
FROM nixos/nix:latest
RUN apk --no-cache add \
wget
RUN nix-env -iA cachix -f https://cachix.org/api/v1/install \
&& cachix use postgrest
# We need an unprivileged user here, to make PG run at all.
RUN adduser --disabled-password --ingroup root nix \
&& chown -R nix:root /nix
USER nix:root
ENV USER=nix
VOLUME /nix
VOLUME /postgrest
WORKDIR /postgrest
CMD nix-shell