Proper setup of a host for Discourse Docker container

verulian

Member
Feb 18, 2019
52
0
6
39
The preferred method of setting up an instance of Discourse is to use Ubuntu 18.04 to install a Dockerized container for Discourse. Unfortunately Discourse developers are very particular about keeping with their configuration standards and so there's not a lot of wiggle room if you want any serious support on their forums.

Is there a way to install an Ubuntu 18.04 container in Proxmox that will then in turn allow for a Docker installation of Discourse? Or is using an Ubuntu full VM guest install the only real option to run a Docker container afterwards?

Furthermore, I was hoping to find an Ubuntu 18.04 container option to experiment with, but when I went to select a template list is empty. Is there something I'm missing in the way of populating the contents of the containers for installation?
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
13,809
445
103
when I went to select a template list is empty
we have templates for all ubuntu versions, even 19.10.

you can download these templates directly to your local template storage (there is a download button.)
 

verulian

Member
Feb 18, 2019
52
0
6
39
Hmm, I'm not seeing a download button anywhere oddly...

Furthermore, can Docker containers run within an LXC container or would the VM path be better in this case?
 

verulian

Member
Feb 18, 2019
52
0
6
39
Oh, so you're saying click on "Templates" at this point, but on the other "Create: LXC Container" > "Template" THAT is where they don't show up, you have to add them first here at your screenshot point. Thanks.
 

verulian

Member
Feb 18, 2019
52
0
6
39
So this got me to the next point of my question regarding Docker. It turns out that Discourse will not work with the `vfs` storage driver. Is there a way to use aufs or overlay2 instead with Proxmox?
 

verulian

Member
Feb 18, 2019
52
0
6
39
To document my steps at getting Docker with Discourse working further, I edited:
Code:
/etc/pve/nodes/nodename/lxc
to contain:
Code:
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:
I then edited `nano /etc/modules` to contain:
Code:
aufs
overlay
I rebooted to verify that these modules are loaded, and they are.

After I had followed the steps from these instructions previously, I then ran this:
Code:
/var/discourse/launcher bootstrap app
This got me closer, but still having trouble:
Code:
/usr/bin/docker: Error response from daemon: Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: permission denied.
Your Docker installation is not working correctly
 

verulian

Member
Feb 18, 2019
52
0
6
39
Thanks for the concern: No, this is on an isolated LAN with no security risk whatsoever for development/staging/testing only purposes. I'm still hitting a wall here and would like to know how to get past this open /sys/kernel/security/apparmor/profiles: permission denied issue.
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
878
89
28
I'm still hitting a wall here and would like to know how to get past this open /sys/kernel/security/apparmor/profiles: permission denied issue.
did you enable nesting? docker needs it to work in lxc containers.
 

verulian

Member
Feb 18, 2019
52
0
6
39
I did enable it this via the options method:
nesting.png

However I still get the same AppArmor issue:
Code:
/usr/bin/docker: Error response from daemon: Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: permission denied.
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
878
89
28
try to see if docker run hello-world works in the container
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!