diff --git a/Dockerfile b/Dockerfile index 6d7ff49..53c15a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM alpine:latest +FROM alpine:3.15 RUN \ - apk add --update --no-cache bash curl lxc lxcfs python3 py3-requests py3-yaml arch-install-scripts tar zstd \ + apk add --update --no-cache bash curl lxc lxc-templates bridge lxcfs python3 py3-requests py3-yaml arch-install-scripts tar zstd \ && echo "lxc.lxcpath = /data" > /etc/lxc/lxc.conf \ && ln -sf /scripts/shellwrapper /bin/sh \ && echo "PS1='\\h (outer docker container, to enter inner container use: lxc-attach -n machine) \\w # '" > /root/.bashrc diff --git a/README.md b/README.md index 2ae8ff5..038a749 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ This project allows to use a single LXC container within a docker container to g * Provide "home containers" for your users, each with own ssh access and persistent state * Run a linux remote desktop server on kubernetes * Easily run statefull software (like froxlor control panel or plesk) on docker/kubernetes +* Run using other linux flavors - requires systemd - https://linuxcontainers.org/lxc/getting-started/ ### Ideas / Backlog diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..adb2b0a --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +docker build . --tag lxc \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..f937e98 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +docker run --privileged --hostname lxctest1 -v /tmp/lxc:/data -e USE_LXCFS=false -e DISTRIBUTION=alpine lxc +#docker run --privileged --hostname lxctest1 -v /tmp:/data -e USE_LXCFS=false -e DISTRIBUTION=alpine -it lxc ash +#/usr/bin/python3 /scripts/launch.py diff --git a/scripts/lxc-config b/scripts/lxc-config index 2bc173e..67d5c37 100644 --- a/scripts/lxc-config +++ b/scripts/lxc-config @@ -31,3 +31,7 @@ lxc.rootfs.path=/data/rootfs # Extra mounts for additional volumes which can be mounted to /vol on docker lxc.mount.entry = /vol vol none rbind 0 0 + +lxc.apparmor.allow_incomplete = 1 + +# lxc.aa_allow_incomplete = 1 \ No newline at end of file