Skip to content

Commit 469825f

Browse files
Fix deprecated contents parameter in docker images (#2043)
This is now `copyToRoot` and takes a derivation.
1 parent 7a0af4d commit 469825f

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

nix/hydra/docker.nix

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
name = "hydra-node";
1111
tag = "latest";
1212
created = "now";
13-
contents = [
14-
pkgs.busybox
15-
];
13+
copyToRoot = pkgs.buildEnv {
14+
name = "hydra-node-env";
15+
paths = [
16+
pkgs.busybox
17+
];
18+
};
1619
config = {
1720
Entrypoint = [ "${self'.packages.hydra-node-static}/bin/hydra-node" ];
1821
};
@@ -22,10 +25,13 @@
2225
name = "hydra-node-for-netem";
2326
tag = "latest";
2427
created = "now";
25-
contents = [
26-
pkgs.iproute2
27-
pkgs.busybox
28-
];
28+
copyToRoot = pkgs.buildEnv {
29+
name = "hydra-node-for-netem-env";
30+
paths = [
31+
pkgs.busybox
32+
pkgs.iproute2
33+
];
34+
};
2935
config = {
3036
Entrypoint = [ "${self'.packages.hydra-node-static}/bin/hydra-node" ];
3137
};
@@ -48,12 +54,15 @@
4854
Entrypoint = [ "${self'.packages.hydraw-static}/bin/hydraw" ];
4955
WorkingDir = "/static";
5056
};
51-
contents = [
52-
(pkgs.runCommand "hydraw-static-files" { } ''
53-
mkdir $out
54-
ln -s ${../../hydraw/static} $out/static
55-
'')
56-
];
57+
copyToRoot = pkgs.buildEnv {
58+
name = "hydraw-env";
59+
paths = [
60+
(pkgs.runCommand "hydraw-static-files" { } ''
61+
mkdir $out
62+
ln -s ${../../hydraw/static} $out/static
63+
'')
64+
];
65+
};
5766
};
5867

5968
docker-hydra-chain-observer = pkgs.dockerTools.buildImage {

0 commit comments

Comments
 (0)