-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (22 loc) · 905 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM debian:jessie-slim
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442
RUN echo 'deb http://download.fpcomplete.com/debian jessie main' | \
tee /etc/apt/sources.list.d/fpco.list
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
curl bzip2 build-essential zlib1g zlib1g-dev libgcrypt11-dev git stack
RUN useradd -ms /bin/bash robot
RUN groupadd nixbld && usermod -a -G nixbld robot
ENV HOME /home/robot
RUN mkdir -p /nix $HOME/.nixpkgs /home/robot/code/.stack-work && \
chown -R robot /nix $HOME/.nixpkgs /home/robot/code/.stack-work
ENV USER robot
USER robot
WORKDIR /home/robot
RUN curl https://nixos.org/nix/install | sh
RUN . $HOME/.nix-profile/etc/profile.d/nix.sh && \
nix-channel --add https://nixos.org/channels/nixpkgs-unstable && \
nix-channel --update
WORKDIR /home/robot/code
ADD . .
RUN stack setup
RUN stack build