Coder Social home page Coder Social logo

Comments (3)

Hoverbear avatar Hoverbear commented on June 6, 2024

@edolstra I would be quite curious if you had thoughts around the hostname problem above and if that impacts our discussion about this, since it seems like we can't offer full isolation anyways (with default settings).

from nix-installer.

Hoverbear avatar Hoverbear commented on June 6, 2024

Noting Docker seems to work fine with some relatively straighforward patches:

image

However podman seems to lack some permissions:

image

Dockerfile:

FROM ubuntu
RUN apt update -y
RUN apt install curl systemd -y
COPY nix-installer /nix-installer
diff --git a/src/action/common/configure_nix_daemon_service.rs b/src/action/common/configure_nix_daemon_service.rs
index 8fc418a..31969d9 100644
--- a/src/action/common/configure_nix_daemon_service.rs
+++ b/src/action/common/configure_nix_daemon_service.rs
@@ -33,11 +33,11 @@ impl ConfigureNixDaemonService {
             }
             | OperatingSystem::Darwin => (),
             _ => {
-                if !Path::new("/run/systemd/system").exists() {
-                    return Err(ActionError::Custom(Box::new(
-                        ConfigureNixDaemonServiceError::InitNotSupported,
-                    )));
-                }
+                // if !Path::new("/run/systemd/system").exists() {
+                //     return Err(ActionError::Custom(Box::new(
+                //         ConfigureNixDaemonServiceError::InitNotSupported,
+                //     )));
+                // }
             },
         };
 
@@ -142,24 +142,24 @@ impl Action for ConfigureNixDaemonService {
                 .await
                 .map_err(ActionError::Command)?;
 
-                execute_command(
-                    Command::new("systemctl")
:...skipping...
diff --git a/src/action/common/configure_nix_daemon_service.rs b/src/action/common/configure_nix_daemon_service.rs
index 8fc418a..31969d9 100644
--- a/src/action/common/configure_nix_daemon_service.rs
+++ b/src/action/common/configure_nix_daemon_service.rs
@@ -33,11 +33,11 @@ impl ConfigureNixDaemonService {
             }
             | OperatingSystem::Darwin => (),
             _ => {
-                if !Path::new("/run/systemd/system").exists() {
-                    return Err(ActionError::Custom(Box::new(
-                        ConfigureNixDaemonServiceError::InitNotSupported,
-                    )));
-                }
+                // if !Path::new("/run/systemd/system").exists() {
+                //     return Err(ActionError::Custom(Box::new(
+                //         ConfigureNixDaemonServiceError::InitNotSupported,
+                //     )));
+                // }
             },
         };
 
@@ -142,24 +142,24 @@ impl Action for ConfigureNixDaemonService {
                 .await
                 .map_err(ActionError::Command)?;
 
-                execute_command(
-                    Command::new("systemctl")
-                        .process_group(0)
-                        .arg("daemon-reload")
-                        .stdin(std::process::Stdio::null()),
-                )
-                .await
-                .map_err(ActionError::Command)?;
-
-                execute_command(
-                    Command::new("systemctl")
-                        .process_group(0)
-                        .arg("enable")
-                        .arg("--now")
-                        .arg(SOCKET_SRC),
-                )
-                .await
-                .map_err(ActionError::Command)?;
+                // execute_command(
+                //     Command::new("systemctl")
+                //         .process_group(0)
+                //         .arg("daemon-reload")
+                //         .stdin(std::process::Stdio::null()),
+                // )
+                // .await
+                // .map_err(ActionError::Command)?;
+
+                // execute_command(
+                //     Command::new("systemctl")
+                //         .process_group(0)
+                //         .arg("enable")
+                //         .arg("--now")
+                //         .arg(SOCKET_SRC),
+                // )
+                // .await
+                // .map_err(ActionError::Command)?;
             },
         };

from nix-installer.

Hoverbear avatar Hoverbear commented on June 6, 2024

In #196 we're testing auto-uid allocation which may impact the final outcome of this.

from nix-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.