I'm doing some tinkering with converting a Docker container into an LXC container. Albeit ofcourse via doing some dirty tricks. But nevertheless very educational.
To get the LXC container to run, i've had to install the package `init`. If i now look in the container i see the /sbin/init to be symlink to /lib/systemd/systemd. If i do `ps -aux` i see that `/sbin/init` is running with PID 1.
I now start the LXC container within Proxmox and check for the processes (ps -aux), i can see that "/sbin/init" is running with PID 1. Perfect!
The Docker container makes use of the "s6-overlay" tool for "init". The s6-overlay tool checks for the PID to be `1`. But i'm kind of stuck on this hurdle.
I've provided the config-parameter "lxc.init_cmd: /init".
When i start the LXC container with `pct start 999 --debug` i see the following output:
But that doesn't work. Is there maybe some more trickery i can try?
To get the LXC container to run, i've had to install the package `init`. If i now look in the container i see the /sbin/init to be symlink to /lib/systemd/systemd. If i do `ps -aux` i see that `/sbin/init` is running with PID 1.
I now start the LXC container within Proxmox and check for the processes (ps -aux), i can see that "/sbin/init" is running with PID 1. Perfect!
The Docker container makes use of the "s6-overlay" tool for "init". The s6-overlay tool checks for the PID to be `1`. But i'm kind of stuck on this hurdle.
I've provided the config-parameter "lxc.init_cmd: /init".
When i start the LXC container with `pct start 999 --debug` i see the following output:
Code:
NOTICE conf - ../src/lxc/conf.c:lxc_setup:4511 - The container "999" is set up
INFO apparmor - ../src/lxc/lsm/apparmor.c:apparmor_process_label_set_at:1189 - Set AppArmor label to "lxc-999_</var/lib/lxc>//&:lxc
-999_<-var-lib-lxc>:"
INFO apparmor - ../src/lxc/lsm/apparmor.c:apparmor_process_label_set:1234 - Changed AppArmor profile to lxc-999_</var/lib/lxc>//&:l
xc-999_<-var-lib-lxc>:
DEBUG terminal - ../src/lxc/terminal.c:lxc_terminal_peer_default:696 - No such device - The process does not have a controlling term
inal
NOTICE utils - ../src/lxc/utils.c:lxc_drop_groups:1367 - Dropped supplimentary groups
NOTICE start - ../src/lxc/start.c:start:2194 - Exec'ing "/init"
NOTICE start - ../src/lxc/start.c:post_start:2205 - Started "/init" with pid "1157714"
NOTICE start - ../src/lxc/start.c:signal_handler:446 - Received 17 from pid 1157699 instead of container init 1157714
But that doesn't work. Is there maybe some more trickery i can try?
Last edited: