From 8ccd981c1b012ca869f5d0d78c4204e4a631bb0f Mon Sep 17 00:00:00 2001 From: dramforever Date: Wed, 15 Jan 2020 13:17:19 +0800 Subject: [PATCH] nix-channels: add to dockerfiles --- dockerfiles/nix-channels/Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dockerfiles/nix-channels/Dockerfile diff --git a/dockerfiles/nix-channels/Dockerfile b/dockerfiles/nix-channels/Dockerfile new file mode 100644 index 0000000..f9f8a2b --- /dev/null +++ b/dockerfiles/nix-channels/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3-buster +MAINTAINER Wang Ruikang + +RUN curl https://mirrors.tuna.tsinghua.edu.cn/nix/nix-2.3.2/nix-2.3.2-x86_64-linux.tar.xz -o /tmp/nix.tar.xz + +RUN pip3 install pyquery requests + +# Install Nix. To simplify management we only copy binaries and create +# symlinks, and do no further configuration + +RUN mkdir /tmp/nix.unpack && \ + tar xpf /tmp/nix.tar.xz -C /tmp/nix.unpack && \ + mkdir /nix && \ + cp -dpr /tmp/nix.unpack/*/store /nix/store && \ + ln -s /nix/store/*-nix-*/bin/* /usr/local/bin && \ + rm -rf /tmp/nix.tar.xz /tmp/nix.unpack + +ENV HOME=/tmp +CMD /bin/bash