generated from srid/rib-sample
-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathdocker.nix
35 lines (34 loc) · 747 Bytes
/
docker.nix
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
# Builds a docker image containing the neuron executable
#
# Run as:
# docker load -i $(
# nix-build docker.nix \
# --argstr name <image-name> \
# --argstr tag <image-tag>
# )
let
pkgs = import ./nixpkgs.nix { };
neuron = (import ./project.nix { }).neuron;
in
{ name ? "sridca/neuron"
, tag ? "dev"
}: pkgs.dockerTools.buildImage {
inherit name tag;
contents = [
neuron
# These are required for the GitLab CI runner
pkgs.coreutils
pkgs.bash_5
];
config = {
Env = [
# For i18n to work (with filenames, etc.)
"LANG=en_US.UTF-8"
"LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive"
];
WorkingDir = "/notes";
Volumes = {
"/notes" = { };
};
};
}