Questions tagged [containers]
416 questions
139
votes
4 answers
How to handle security updates within Docker containers?
When deploying applications onto servers, there is typically a separation between what the application bundles with itself and what it expects from the platform (operating system and installed packages) to provide. One point of this is that the…
Markus Miller
- 1,914
- 3
- 15
- 15
44
votes
2 answers
docker-compose: option to automaticaly remove container after run in docker-compose.yml
The docker-compose run reference states that it has the --rm option to
Remove container after run.
I want to make this a default run behavior for some of services I specify in docker-compose.yml.
So, the questions are:
Can it somehow be…
Ivan Kolmychek
- 1,154
- 2
- 9
- 13
39
votes
7 answers
Update the container of a service in Amazon ECS
What kind of approach is recommended for updating the container of a service which is running in Amazon ECS?
The AWS documentation says: "If you have updated the Docker image of your application, you can create a new task definition with that image…
Petrus Repo
- 492
- 1
- 4
- 7
23
votes
2 answers
loop device in a Linux container?
I'm attempting to use a loop device inside a container, to mount some image file:
> sudo losetup /dev/loop0 test.img
losetup: /dev/loop0: failed to set up loop device: No such file or directory
/dev/loop0 indeed doesn't exist, and
> sudo mknod…
Johannes Ernst
- 1,037
- 4
- 16
- 26
21
votes
2 answers
How to add a file to a docker container which has no root permissions?
I'm trying to add a file to a Docker image built from the official tomcat image. That image does not seem to have root rights, as I'm logged in as user tomcat if I run bash:
docker run -it tomcat /bin/bash
tomcat@06359f7cc4db:/usr/local/tomcat$
If…
nyi
- 320
- 1
- 2
- 7
20
votes
4 answers
Why do cloud compute instances spin up VMs and not containers?
In AWS for example, when I spin up a new EC2 instance, it loads up a new VM, then populate the VM with a container image. This is the reason why spinning up new EC2 instances take 60-90 seconds to start.
Out of curiosity, what are the disadvantages…
user3667125
- 339
- 2
- 6
15
votes
5 answers
How to exit all supervisor processes if one exited with 0 result
I run docker container with supervisor like this:
Dockerfile
CMD ["/run.sh"]
run.sh
#!/usr/bin/env bash
exec supervisord…
Vitaly Velikodny
- 341
- 1
- 2
- 9
14
votes
4 answers
chmod: changing permissions of 'myscript.sh' : Operation not permitted
While running the following docker file I am getting "chmod: changing permissions of '/scripts/entrypoint.sh': Operation not permitted" error.
FROM sonarqube:7.7-community
ADD plugins/* /plugins/
ADD scripts/* /scripts/
ADD conf/* /conf/
ADD bin/*…
JYOTI PRAKASH MALLICK
- 243
- 1
- 2
- 5
13
votes
3 answers
Linux containers (LXC) on Red Hat/CentOS EL6 - lxc-create versus libvirt?
It's tricky trying to stay within the good graces of Red Hat and still plan for system longevity...
I've been a proponent of Linux Containers (LXC) for over a year. My initial installations were based on information gleaned from online tutorials,…
ewwhite
- 194,921
- 91
- 434
- 799
12
votes
3 answers
Proper way of handling LXC containers on btrfs
Lets say we have one server with lxc installed, and a lxc container used for as a base img /var/lib/lxc/ubuntu_base. For simplicity let's forget the config changes after copying the base img.
some people suggest using subvolumes and snapshots for…
zidarsk8
- 384
- 1
- 3
- 12
11
votes
4 answers
Iptables LOG rule inside a network namespace
I'm trying to setup iptables rules for a docker container. I'm using nsenter to execute the iptables command inside of the container's network namespace:
# log access to port 8080
PID=$(docker inspect --format "{{.State.Pid}}"…
Fabian Jakobs
- 764
- 9
- 11
10
votes
1 answer
Prevent fork bomb inside docker container
I am currently struggling with limiting number of processes for user which I called sandbox.
I configured processes limit inside /etc/security/limits.conf like this:
sandbox hard nproc 100
But if I want to connect to…
eXPi
- 101
- 1
- 3
9
votes
3 answers
Explain in Plain English what is LXC and for what it is useful
What is LXC?
For what it is useful?
What are the differences between LXC and common virtualization?
Daniel Cukier
- 823
- 1
- 10
- 18
9
votes
3 answers
Why LXC when there is linux-vserver?
I am no LXC expert, but as far as I know it is really similar to linux-vserver.
If that is correct, I wonder why there is another player in the already crowded virtualization camp? What does LXC provide (or promise) that linux-vserver doesn't…
Luke404
- 5,708
- 3
- 44
- 58
8
votes
3 answers
How do I give a docker container its own routable IP on the original network?
Main question
Imagine this scenario.
A network of 192.168.0.0/24.
A computer with hostname 'Docker-Host' is running a docker engine at
192.168.0.2
'Docker-Host' has sshd server running
On 'Docker-Host' , I'm running a application in a container…
TrevorKS
- 233
- 1
- 2
- 6