For my group’s capstone project, we’ve installed the Centos 7 operating system on our servers and switches. So far we’ve managed to install LXC and create some containers, and configure networking settings for them, but are trying to figure out what to do next in order to install services (such as SMTP, SQL, Web Server, etc.) within the containers.
I’ve been researching for an hour and a half, but the only tutorials I can find cover setting up services on the Centos operating system itself, and configuring LXC containers.
What I’m trying to find out is whether there is anything I need to do differently in order to install services within an LXC container. Is there any difference, or can I simply just start and go into a container (switch from “[root@server~]#” to “[root@container_name~]#”), and start configuring with commands?
Our current workaround for getting into the containers is the command:
[root@container_name ~]# lxc-attach -n container_name
Will that be an issue for configuring services in the LXC containers?
You are using LXC instead of LXD (which is easier). With LXD, the commands are like lxc launch ubuntu:18.04 mycontainer instead of lxc-create.
Then, you can install any services in the containers and expose them to the network. You can do so either with iptables, with a proxy like haproxy or even with the LXD built-in proxy.
You should first make sure that your tutorial is correct; the yum command does not seem fine to me, the package to install is nowhere to be seen.
It is not on topic for a forum about lxc/lxd to ask help on a tutorial on mail installation.