diff options
author | Maarten Hoogendoorn <maarten@moretea.nl> | 2017-08-18 17:06:26 +0200 |
---|---|---|
committer | Maarten Hoogendoorn <maarten@moretea.nl> | 2017-08-18 17:06:50 +0200 |
commit | a3dde7776bd8200887e68909b637bc49451b7fed (patch) | |
tree | 256324ab445f209a1660a72ebdec3ba67f39f533 /pkgs/applications/networking/cluster/openshift | |
parent | f8a72662cf1ca0717f1007d26a3d789f088c5c47 (diff) |
Fix `oc cluster up`
The command `oc cluster up` mainly runs code though Docker containers.
However, in pkg/bootstrap/docker/host/host.go, nsenter is used to run
some commands on the host. For this to work on NixOS, we need to provide
the absolute path to the required programs.
Diffstat (limited to 'pkgs/applications/networking/cluster/openshift')
-rw-r--r-- | pkgs/applications/networking/cluster/openshift/default.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/openshift/default.nix b/pkgs/applications/networking/cluster/openshift/default.nix index ca4793251499..e7e2d1763ad7 100644 --- a/pkgs/applications/networking/cluster/openshift/default.nix +++ b/pkgs/applications/networking/cluster/openshift/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, which, buildGoPackage }: +{ stdenv, fetchFromGitHub, which, buildGoPackage, utillinux, coreutils }: let version = "3.6.0"; @@ -22,6 +22,17 @@ in buildGoPackage rec { goPackagePath = null; patchPhase = '' patchShebangs ./hack + substituteInPlace pkg/bootstrap/docker/host/host.go \ + --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \ + 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt' + + substituteInPlace pkg/bootstrap/docker/host/host.go \ + --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mount' \ + 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount' + + substituteInPlace pkg/bootstrap/docker/host/host.go \ + --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \ + 'nsenter --mount=/rootfs/proc/1/ns/mnt ${coreutils}/bin/mount' ''; buildPhase = '' |