Questions tagged [lxc]

LXC is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host. It is sometimes referred to as “chroot on steroids”.

LXC provides operating system-level virtualization not via a full blown virtual machine, but rather provides a virtual environment that has its own process and network space. LXC relies on the Linux kernel cgroups functionality that became available in version 2.6.29 and is now available in all further kernel distibutions.

Cgroups was developed as part of LXC. It also relies on other kinds of namespace-isolation functionality, which were developed and integrated into the mainline Linux kernel.

LXC is similar to other OS-level virtualization technologies on Linux such as OpenVZ and Linux-VServer, as well as those on other operating systems such as FreeBSD jails. LXC Containers can define various cpu limits, memory limits etc. (In short all parameters that can be set via CGROUPS) to prevent any one container from interfering with all other containers running on the same LXC host.

LXC uses the linux bridge-utils commands to create local VLANs, and attach containers and physical interfaces to them. With containers the physical overhead (ram, swap space, one kernel per VM, plus hypervisor) that is present in virtualization methods is reduced. With containers, one kernel and one virtual memory space is shared between all the containers running on that host.

For a comparison of other Operating System virtualization techniques, see this link

591 questions
4
votes
1 answer

Setting a static IP to docker container using LXC driver

I installed docker to my ubuntu 14.04 laptop. I pulled docker registry image from the central registry. To fix IP address of the container to a static value, I first changed my /etc/defaults/docker and added -e lxc to DOCKER_OPTS variable. Then to…
Özgür Eroğlu
  • 1,230
  • 10
  • 16
4
votes
2 answers

Moving docker root folder to a new drive / partition

I am trying to move the "/var/lib/docker" folder from one disk to another since that is taking up too much space. I keep running into some errors relating to permissions! According to these questions: How do I move a docker container's image to a…
mirage
  • 632
  • 10
  • 21
4
votes
2 answers

Docker error while PULL - Error downloading dependent layers

I get the following error when pulling a image docker pull ubuntu Pulling repository ubuntu c0fe63f9a4c1: Error pulling image (latest) from ubuntu, read tcp 162.159.253.251:443: connection reset by peer e20bcab99567: Error pulling image (lucid)…
Udara S.S Liyanage
  • 6,189
  • 9
  • 33
  • 34
4
votes
2 answers

Docker containers in real life

I have been following the tutorials and been experimenting with Docker for a couple of days but I can't find any "real-world" usage example.. How can I communicate with my container from the outside? All examples I can find ends up with 1 or more…
xeor
  • 5,301
  • 5
  • 36
  • 59
4
votes
1 answer

How to manage inter-dependant docker containers when moving between or cloning environments

I am trying to wrap my head around how to run this particular workflow with docker. Dev environment for a developer - n number of containers, like db, webserver, appserver etc with dependencies between the containers. So the database will depend…
Abe
  • 8,623
  • 10
  • 50
  • 74
4
votes
3 answers

Using docker volume with a NFS partition

I have a NFS partition on the host, if add it to a container with docker run -i -t -v /srv/nfs4/dir:/mnt ubuntu /mnt will contain the shared data, but doesn't it cause conflicts? Since it hasn't been mounted with nfs-client?
s1na
  • 113
  • 2
  • 11
4
votes
0 answers

Building a container with debootstrap

I'm trying to create a LXC container (lxc-create) and I get this error: E: Invalid Release file, no entry for main/binary-armhf/Packages any way to fix this? This is what happens: root@raspberrypi:/home/pi# lxc-create -n myfirstcontainer -t…
bulkmoustache
  • 1,875
  • 3
  • 20
  • 24
4
votes
2 answers

lxc containers on another partition

I have created two containers(say TestOneContainer and TestTwoContainer) in ubuntu server using LXC. Now the lxc filesystem is in /home folder and two containers also use /home folder. I have created two partition(100 GB for TestOneContainer and 200…
user3002180
  • 431
  • 6
  • 19
4
votes
1 answer

Why does Docker claim its container being portable?

Docker claims that containers built with it are more portable than pure LXC containers. I think I understand that there are some conventions and automation of the LXC configuration like for hostname and network configuration. But is there more than…
free_easy
  • 5,061
  • 3
  • 25
  • 39
4
votes
3 answers

Not able to connect to docker containers using SSH

I am new to Docker, I built the container from a Dockerfile, and I can see the container creating and running, but I am not able to connect to that container using ssh. Here is my Dockerfile: FROM ubuntu:12.04 RUN apt-get update RUN apt-get install…
user2496632
  • 61
  • 1
  • 1
  • 6
4
votes
2 answers

Is using linux containers (lxc) like docker is safe?

If I will allow user to run whatever he want, is he able to do bad thinks to env in which container was executed?
Sławosz
  • 11,187
  • 15
  • 73
  • 106
4
votes
3 answers

Run a complex series of commands in the same Docker container

I'm trying to automate the following loop with Docker: spawn a container, do some work inside of it (more than one single command), get some data out of the container. Something along the lines of: for ( i = 0; i < 10; i++ ) spawn a container …
laurids
  • 931
  • 9
  • 24
4
votes
1 answer

When will Docker be launched?

I need a tool to encapsulate heterogeneous payloads in Standard Containers, and run them on any server with strong guarantees of isolation and repeatability. When will Docker be launched??
Gordan
  • 75
  • 2
4
votes
2 answers

How to spawn a process in Scala with PTY?

In ruby I have: PTY.spawn("/usr/bin/lxc-monitor -n .+") do |i, o, pid| # ... end How do this in scala/java?
Timothy Klim
  • 1,257
  • 15
  • 25
3
votes
2 answers

What ring does qemu execute in?

What ring does qemu execute in when not tied into an existing hypervisor? Any more complete documentation on this subject would be appreciated as well.
Matt Joyce
  • 2,010
  • 2
  • 20
  • 31