Difference between KVM and LXC

Text from https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/Resource_Management_and_Linux_Containers_Guide/sec-Linux_Containers_Compared_to_KVM_Virtualization.html Copyright © 2014 Red Hat, Inc.: Linux Containers Compared to KVM Virtualization The main difference between the KVM virtualization and Linux Containers is that virtual machines require a separate kernel instance to run on, while containers can be deployed from the host operating system. This significantly reduces the complexity of container creation … Read more

Docker: How to live sync host folder with container folder?

You can use volumes in order to do this. You have two options: Docker managed volumes: docker run -v /src/path nodejsapp docker run -i -t -volumes-from <container id> bash The file you edit in the second container will update the first one. Host directory volume: docker run -v `pwd`/host/src/path:/container/src/path nodejsapp The changes you make on … Read more

Running app inside Docker as non-root user

Check this post: http://www.yegor256.com/2014/08/29/docker-non-root.html In rultor.com we run all builds in their own Docker containers. And every time before running the scripts inside the container, we switch to a non-root user. This is how: adduser –disabled-password –gecos ” r adduser r sudo echo ‘%sudo ALL=(ALL) NOPASSWD:ALL’ >> /etc/sudoers su -m r -c /home/r/script.sh r is … Read more

How to SSH into Docker?

Firstly you need to install a SSH server in the images you wish to ssh-into. You can use a base image for all your container with the ssh server installed. Then you only have to run each container mapping the ssh port (default 22) to one to the host’s ports (Remote Server in your image), … Read more

What does Docker add to lxc-tools (the userspace LXC tools)?

From the Docker FAQ: Docker is not a replacement for lxc. “lxc” refers to capabilities of the linux kernel (specifically namespaces and control groups) which allow sandboxing processes from one another, and controlling their resource allocations. On top of this low-level foundation of kernel features, Docker offers a high-level tool with several powerful functionalities: Portable … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)