Antsle Forum

Welcome to our Antsle community! This forum is to connect all Antsle users to post experiences, make user-generated content available for the entire community and more. 

Please note: This forum is about discussing one specific issue at a time. No generalizations. No judgments. Please check the Forum Rules before posting. If you have specific questions about your Antsle and expect a response from our team directly, please continue to use the appropriate channels (email: [email protected]) so every inquiry is tracked. 

You need to log in to create posts and topics.

Run Docker image in LXC

If you don't want to run a Docker container directly on the Antsle, you can run the container inside an LXC.

  • Create an Ubuntu16.04-LXC
    • (created in Antman)
  • add a bridged interface
    • (added in Antman)
  • apt-get install apt-transport-https ca-certificates curl software-properties-common nano
    • (Install some needed tools)
  • nano /etc/network/interfaces
    • (configure static IP on the bridged interface, 10.0.0.11 in this example)
      • address 10.0.0.11
      • netmask 255.255.255.0
      • default 10.0.0.1
      • dns-nameservers 8.8.8.8 8.8.4.4
  • nano /etc/hosts
    • (update hosts)
      • 10.0.0.11       antlet11
  • reboot now
    • (make sure bridged interface is up)
  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    • (this fails if curl in not installed or the etc/hosts is not updated)
  • add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
    • (this fails if software-properties-common and apt-transport-https are not installed)
  • apt-get update
    • (update apt-get)
  • apt install docker-ce=17.09.1~ce-0~ubuntu
    • (NOTE: this is calling docker-ce 17.09.1, 18.x may cause an issue; see below)

 

  • Run a container:

docker run -d --name=netdata \
-p 19999:19999 \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--cap-add SYS_PTRACE \
--security-opt apparmor=unconfined \
netdata/netdata

 

  • Notes:

When running Docker 18.09.2 (apt-get install docker-ce) I run into this issue:

docker run hello-world

docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.

If I downgrade to Docker 17.09.1 apt install docker-ce=17.09.1~ce-0~ubuntu), everything runs fine:

Setting up docker-ce (17.09.1~ce-0~ubuntu) ...

[email protected]:~# docker run hello-world

Hello from Docker!

This message shows that your installation appears to be working correctly.

Cool, thanks for the steps! I had done something similar before, but wasn't able to connect with it remotely. I suspect it had something to do with the interfaces, but haven't had time to check. I'll try it out. Thanks @jim-coyne !

powered by proof factor - increase conversions with social proof notifications