Proper setup of a host for Discourse Docker container

verulian

Well-Known Member
Feb 18, 2019
180
21
58
44
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?
 
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.)
 
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?
 

Attachments

  • template-download.png
    template-download.png
    43.3 KB · Views: 46
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.
 
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?
 
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
 
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.
 
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.
 
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.
 
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, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!