Last active
December 1, 2024 05:30
-
-
Save e-minguez/0e74044a32a6870ebebf044a1ad487e2 to your computer and use it in GitHub Desktop.
Revisions
-
Eduardo Mínguez revised this gist
Mar 24, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,5 +52,6 @@ update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy Finally, install docker: ```bash curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh ``` -
Eduardo Mínguez revised this gist
Mar 24, 2021 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,8 +47,6 @@ Install prerrequisites: apt install iptables kmod update-alternatives --set iptables /usr/sbin/iptables-legacy update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy ``` Finally, install docker: -
Eduardo Mínguez revised this gist
Mar 24, 2021 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,12 +41,18 @@ lxc-start -n <container_name> lxc-attach -n <container_name> ``` Install prerrequisites: ```bash apt install iptables kmod update-alternatives --set iptables /usr/sbin/iptables-legacy update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy update-alternatives --set arptables /usr/sbin/arptables-legacy update-alternatives --set ebtables /usr/sbin/ebtables-legacy ``` Finally, install docker: ```bash apt install docker.io ``` -
Eduardo Mínguez created this gist
Mar 24, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ ## Turris ```bash opkg install kmod-veth opkg install kmod-ipt-extra opkg install iptables-mod-extra ``` * Install a new container (I created an arch linux container) * Open up the /srv/lxc/containername/config file for editing: ```ini # Be aware this has security implications lxc.include = /usr/share/lxc/config/nesting.conf # Configure network to bridge to lan lxc.net.0.type = veth lxc.net.0.link = br-lan lxc.net.0.flags = up lxc.net.0.name = eth0 lxc.net.0.hwaddr = 22:11:85:de:f9:fb # Add the following lines to open up access to the host, allowing docker to successfully start raw.lxc: |- lxc.mount.auto = cgroup:rw:force lxc.cgroup.devices.allow = a security.nesting: "true" security.privileged: "true" lxc.cap.drop = ``` * Save and exit the config file * Start the lxc container ```bash lxc-start -n <container_name> ``` * Attach to the console of the lxc container ```bash lxc-attach -n <container_name> ``` Install docker and stuff: ```bash update-alternatives --set iptables /usr/sbin/iptables-legacy update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy update-alternatives --set arptables /usr/sbin/arptables-legacy update-alternatives --set ebtables /usr/sbin/ebtables-legacy apt install docker.io kmod ```