-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (24 loc) · 713 Bytes
/
Dockerfile
File metadata and controls
37 lines (24 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM nixos/nix:latest as builder
ARG branch
RUN nix-env -iA nixpkgs.git
RUN nix-env -iA nixpkgs.git-lfs
RUN nix-env -iA cachix -f https://cachix.org/api/v1/install
RUN cachix use ares
RUN git clone --branch ${branch} --depth 1 https://github.com/urbit/urbit.git /tmp/urbit
WORKDIR /tmp/urbit
RUN git lfs install
RUN git lfs pull
RUN nix-env -f . -iA urbit -iA herb
ADD docker.nix /tmp/urbit/docker.nix
RUN nix-build docker.nix --show-trace
RUN mkdir /image /output
RUN tar xzf result -C /image
RUN tar xf /image/*/layer.tar -C /output
# create minimal image
FROM busybox
COPY --from=builder /output /
COPY entrypoint.sh /
ENV LANG C.UTF-8
WORKDIR /urbit
VOLUME /urbit
ENTRYPOINT [ "/entrypoint.sh" ]