We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

104

You can use Docker Desktop for Windows as the engine and Docker for Linux as the client in WSL on Ubuntu / Debian on Windows. Connect them via TCP. Install Docker Desktop for Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows If you want to use Windows Containers instead of Linux Containers both type containers can be managed by ...


64

Woo, I found a post on github that solved my problem. After Steve K. pointed out that it wasn't actually a DNS issue and was a connectivity issue, I was able to find a post on github that described how to fix this problem. Apparently the docker0 network bridge was hung up. Installing bridge-utils and running the following got my Docker in working order: ...


56

Yes, Ctrl-aq, should work by default, however no, lxc-console does not actually use screen to accomplish its console behavior. In fact, you might be encountering a conflict if you are using screen since it also uses Ctrl-a as a prefix. If you're inside screen but don't realize it then you'll need to type Ctrl-a a q since the default behavior of screen is ...


54

Let's use their respective web pages to find out what are all these projects about. I'll change the order in which you listed, though: Chef: Chef is an automation platform that transforms infrastructure into code. This is a configuration management software. Most of them use the same paradigm: they allow you to define the state you want a machine to be, ...


51

As of right now (April 2016) the answer is: We do not know yet (but probably not). The facts Windows 10 can now run a variety of Linux programs (among them the Bash shell and various text utilities). These are not ports (i.e. recompiled versions, like for example in Cygwin), they are the same ELF binaries that run on a typical Linux system. In this case, ...


48

Edit /etc/hostname is one thing for which you need ssh access inside the container. Otherwise, you can spin up the container with -h option. To set the host and domain names: $ docker run -h foo.bar.baz -i -t ubuntu bash root@foo:/# hostname foo root@foo:/# hostname -d bar.baz root@foo:/# hostname -f foo.bar.baz


45

I'm going to dispel a few myths here. This is just a bad idea. I'm sorry. – Jacob Mar 5 at 20:30 I don't see how this is a bad idea. It's really just a chroot inside a chroot. On one hand, it could possibly decrease performance in some negligible manner (nothing compared to running a VM inside a VM). On the other hand, it's likely to be more secure (e.g. ...


23

First of all i would like you to understand Cgroups that are a part of the LXC utility. when you have a container, you would obviously want to ensure that the various containers you have running done starve any other container or process within. With this in mind, the nice guy of the LXC project a.k.a Daniel Lezcano integrated cgroups with the container ...


17

I'm not familiar with lxc, but try the following commands: # mkdir /dev/net # mknod /dev/net/tun c 10 200 # chmod 666 /dev/net/tun


17

In fact you can set the address and gateway from within the host and configure the container not to touch the interface at all using the keyword manual. Place this within the guests /etc/network/interfaces: auto eth0 iface eth0 inet manual Also leave it up to the container's config file to set up the interface: lxc.network.type = veth lxc.network.flags = ...


15

There's nothing exactly like Linux containers in the Windows world. App-V is probably the closest you'll get.


14

Linux Containers (LXC) are an operating system-level virtualization method for running multiple isolated server installs (containers) on a single control host. LXC does not provide a virtual machine, but rather provides a virtual environment that has its own process and network space. It is similar to a chroot, but offers much more isolation. Linux ...


14

If it is a DNS resolver problem, here is the solution: First thing to check is run cat /etc/resolv.conf in the docker container. If it has an invalid DNS server, such as nameserver 127.0.x.x, then the container will not be able to resolve the domain names into ip addresses, so ping google.com will fail. Second thing to check is run cat /etc/resolv.conf on ...


13

With Ubuntu 14.04 (trusty) you can simply add the following in the parent container config: lxc.mount.auto = cgroup lxc.aa_profile = lxc-container-default-with-nesting reference: https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-basic-usage (search for "nesting) Make sure that you have pre-configured network before booting to avoid an long pause before ...


13

Let's assume that your own IP is 192.168.1.1, your gateway is 192.168.1.254 and your network is 192.168.1.0/24. You should make a bridged interface on your host machine, like this in /etc/network/interfaces file auto lo iface lo inet loopback auto br0 iface br0 inet static address 192.168.1.1 network 192.168.1.0 netmask 255.255.255.0 ...


13

Edit: I'll keep my original answer below, but I'll try to explain what's happening here and provide a general solution for you. Edit 2: Provided another option. The problem that you're hitting here has to do with how the kernel manages I/O. When you make a write to your filesystem, that write isn't immediately committed to disk; that would be incredibly ...


13

In an attempt to add additional value to an issue I also experienced; with an alternative answer: My network was office related and Google DNS settings were blocked so that the container could ping IP addresses but not domain names. My host's /etc/resolv.conf originally looked like; #Dynamic resolv.conf(5) file for glibc resolver(3) generated by ...


13

Docker is VERY lightweight compared to a VM and a VM system should function just fine running containers. Each container essentially does run as an isolated system so it's very good for isolation from a perspective of system stability. Based on your description it sounds like the ideal use case for Docker. If you do experiment with Docker make sure you use ...


13

No, this is not possible. Docker needs multiple things in order to run containers: chroot Namespaces for: PID Users Network Mounts UTS IPC These are all kernel features that are implemented in Linux. Unfortunately, most of them do not have a similar feature in Windows to use as a replacement (nor in the Linux Subsystem that Microsoft implemented in the ...


13

The first insider preview was released yesterday. I've attempted to install docker but it fails with the following: So it would appear, that for the first preview it does not currently work. However as many people have speculated, it may work in a future release.


12

On the reference installation (only once): dpkg-query -W -f='${Package}\n' | sort > baselist.txt (The following assumes bash) To get the packages added from the reference installation (this doesn't show what was removed): comm -1 -3 baselist.txt <(dpkg-query -W -f='${Package}\n' | sort) Even better, avoiding copy of baselist.txt: comm -1 -3 <(...


12

The later release (non-beta) of lxd (v2.0) seems to have resolved my issue. The steps, which may be found in the excellent documentation here, are: Publish an image (without stopping the container) on host A; $ lxc publish --force container_name --alias image_name Container published with fingerprint: d2fd708361...a125d0d5885 Export the image to a file; $...


11

Both forms allow multiple operating systems to run on a single physical machine. With containers, these operating systems are isolated (they have their own file systems, processes, libraries including the libc, IP address, etc.) but they are nevertheless sharing the very same kernel. That's the reason why uname -a showed your host kernel version. With ...


10

It is possible to run a different distribution, but the kernel that's being used, has to be the same. So if your Debian and ubuntu use the same kernel or can work with the same kernel, there shouldn't be a problem. I don't know however if 12.04 can support the latest lenny kernel (it's pretty dated and support has been dropped for lenny by debian).


10

Take a look at docker export. To quickly list the files in your container: docker export CONTAINER|tar -t To export: docker export CONTAINER>snapshot.tar docker export CONTAINER|tar x PATH-IN-CONTAINER Or to look at a file: docker export CONTAINER|tar x --to-stdout PATH-IN-CONTAINER # e.g. docker export consul|tar x --to-stdout etc/profile Docker ...


10

Revised answer: LXC containers share the same kernel as the host, so any filesystem they mount should be accessible from outside. If you do a cat /proc/mounts on the host, can you see the container filesystems? If you see a line like /dev/mapper/... /var/lib/lxc/o1/rootfs ext4 ... then you should be able to access /var/lib/lxc/o1/rootfs from the host, ...


10

LXC/Docker by design doesn't have anything to do with RAID (any RAID) at all. Docker/LXC containers are run on the same kernel as the host. As such I don't think there are any docker related problems.


9

Red Hat is making a huge containerization push. They're building an entire new product, Red Hat Enterprise Linux Atomic Host, around it. For a less radical approach, take a look at their RHEL7 beta Resource Management and Linux Containers Guide; you'll notice it pushes libvirt-lxc and makes no mention of the lxc tools.


9

The workaround was to append lxc.aa_allow_incomplete = 1 into /var/lib/lxc/[container-name]/config file. This setting will lower the security offered by apparmor. This is an excerpt from the lxc.container.conf(5) man page. lxc.aa_allow_incomplete Apparmor profiles are pathname based. Therefore many file restrictions require mount ...


9

But do I need a CPU that supports virtualization to run containerization such as Docker, or since it runs an app using the OS's libraries in a container, can I just run it on a CPU without virtualization? No, Docker (and other container solutions like LXC) do not require any special hardware support. They are effectively an enhanced version of chroot that ...


Only top voted, non community-wiki answers of a minimum length are eligible