summaryrefslogtreecommitdiff
path: root/doc/forum/Using_propellor_for_continers_only
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum/Using_propellor_for_continers_only')
-rw-r--r--doc/forum/Using_propellor_for_continers_only/comment_3_cd4b9b9e160469e9f0b105f6c40a4ef8._comment54
-rw-r--r--doc/forum/Using_propellor_for_continers_only/comment_4_9dc985b26c29b9ce21e6c75ec03f6262._comment21
2 files changed, 75 insertions, 0 deletions
diff --git a/doc/forum/Using_propellor_for_continers_only/comment_3_cd4b9b9e160469e9f0b105f6c40a4ef8._comment b/doc/forum/Using_propellor_for_continers_only/comment_3_cd4b9b9e160469e9f0b105f6c40a4ef8._comment
new file mode 100644
index 00000000..fceeedcf
--- /dev/null
+++ b/doc/forum/Using_propellor_for_continers_only/comment_3_cd4b9b9e160469e9f0b105f6c40a4ef8._comment
@@ -0,0 +1,54 @@
+[[!comment format=mdwn
+ username="bardur.arantsson"
+ avatar="http://cdn.libravatar.org/avatar/a0be0039b44d33262b7ae650a0803ad5"
+ subject="comment 3"
+ date="2017-05-12T06:50:49Z"
+ content="""
+Ok, so I've tried to use this to build a Chroot (a reasonable starting point for building containers), using the following program:
+
+ module Main
+ ( main
+ ) where
+
+ import Propellor
+ import Propellor.Engine
+ import Propellor.Property.DiskImage
+ import qualified Propellor.Property.Apt as Apt
+ import qualified Propellor.Property.User as User
+ import Propellor.Property.Chroot
+
+ main :: IO ()
+ main = mainProperties $ host \"whatever\" $ props
+ & provisioned (mychroot \"out\")
+ where
+ mychroot d = debootstrapped mempty d $ props
+ & osDebian Unstable X86_64
+ & Apt.installed [\"linux-image-amd64\"]
+ & User.hasPassword (User \"root\")
+ & User.accountFor (User \"demo\")
+ & User.hasPassword (User \"demo\")
+
+It seems that \"debootstrap\" finishes:
+
+ I: Configuring apt-transport-https...
+ I: Configuring tasksel...
+ I: Configuring tasksel-data...
+ I: Configuring libc-bin...
+ I: Configuring systemd...
+ I: Configuring ca-certificates...
+ I: Base system installed successfully.
+
+But fails immediately afterwards:
+
+ ldd: /usr/local/propellor/propellor: No such file or directory
+ ** warning: user error (ldd [\"/usr/local/propellor/propellor\"] exited 1)
+ whatever chroot out exists ... failed
+ whatever overall ... failed
+
+(I should probably have used a different hostname than \"whatever\", but... whatever :).)
+
+So it seems that the chroot support still expects propellor to be installed on the host system?
+
+I should mention that I've done an extremely small patch to Propellor locally, just to the ChrootBootstrapper instance for ArchLinux to allow it to call debootstrap on Arch Linux -- it seems to exist as a package these days, not sure if it did when that Propellor code was written. Anyway...
+
+"""]]
diff --git a/doc/forum/Using_propellor_for_continers_only/comment_4_9dc985b26c29b9ce21e6c75ec03f6262._comment b/doc/forum/Using_propellor_for_continers_only/comment_4_9dc985b26c29b9ce21e6c75ec03f6262._comment
new file mode 100644
index 00000000..72d7ca83
--- /dev/null
+++ b/doc/forum/Using_propellor_for_continers_only/comment_4_9dc985b26c29b9ce21e6c75ec03f6262._comment
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-05-13T17:42:41Z"
+ content="""
+The way propellor handles running in a chroot or container is it exports
+its binary and support files into the container. This way the
+haskell code can run in a container, rather than being limited to
+only running shell commands in the container, and without needing ghc in
+the container.
+
+It does use the hardcoded `localdir` for that.
+It would certianly be possible to make it use propellor in a different
+location, perhaps using `getExecutablePath`.
+
+Since the git-annex outside the container passes command-line options to
+the one running inside the container to tell it what to do, using
+`mainProperties` would also not work since that does not look at
+command-line options. It would need to use `defaultMain` or
+`processCmdLine` and dispatch itself, or something..
+"""]]