aboutsummaryrefslogtreecommitdiff
path: root/docker.nix
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2022-01-03 16:08:28 -0700
committerBen Burdette <bburdette@gmail.com>2022-01-03 16:08:28 -0700
commita47de1ac37841c29e1a4a7d3a9c50e96390ebaf6 (patch)
tree54819b34b9e090cf32c1ba6865ab9a0af60a9182 /docker.nix
parent5954cbf3e9dca0e3b84e4bf2def74abb3d6f80cd (diff)
parent96d08fcd66e2c38598bab4f39a37a98d58347467 (diff)
Merge branch 'master' into debug-exploratory-PR
Diffstat (limited to 'docker.nix')
-rw-r--r--docker.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/docker.nix b/docker.nix
index 2a13c23fb..bfccdb8f5 100644
--- a/docker.nix
+++ b/docker.nix
@@ -137,11 +137,8 @@ let
name = "root-profile-env";
paths = defaultPkgs;
};
- profile = pkgs.buildPackages.runCommand "user-environment" { } ''
- mkdir $out
- cp -a ${rootEnv}/* $out/
-
- cat > $out/manifest.nix <<EOF
+ manifest = pkgs.buildPackages.runCommand "manifest.nix" { } ''
+ cat > $out <<EOF
[
${lib.concatStringsSep "\n" (builtins.map (drv: let
outputs = drv.outputsToInstall or [ "out" ];
@@ -161,6 +158,11 @@ let
]
EOF
'';
+ profile = pkgs.buildPackages.runCommand "user-environment" { } ''
+ mkdir $out
+ cp -a ${rootEnv}/* $out/
+ ln -s ${manifest} $out/manifest.nix
+ '';
in
pkgs.runCommand "base-system"
{
@@ -178,6 +180,9 @@ let
set -x
mkdir -p $out/etc
+ mkdir -p $out/etc/ssl/certs
+ ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt $out/etc/ssl/certs
+
cat $passwdContentsPath > $out/etc/passwd
echo "" >> $out/etc/passwd
@@ -227,6 +232,9 @@ pkgs.dockerTools.buildLayeredImageWithNixDb {
rm -rf nix-support
ln -s /nix/var/nix/profiles nix/var/nix/gcroots/profiles
'';
+ fakeRootCommands = ''
+ chmod 1777 tmp
+ '';
config = {
Cmd = [ "/root/.nix-profile/bin/bash" ];