Questions tagged [containers]
478 questions
140
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…
Make Mark
- 2,024
- 4
- 17
- 16
55
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,314
40
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
- 502
28
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,207
26
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
- 370
22
votes
5 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/*…
22
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
- 359
16
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
- 361
16
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
- 866
- 10
- 12
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
- 201,205
13
votes
1 answer
How to find out PID of the container using crictl
Kubernetes is deprecating Docker as CRI engine. Now there is containerd and CRI-O, which can be used as an alternative to it. Both can be managed via crictl from cri-tools.
I need some common way to find the PID of running container.
Actually I need…
kvaps
- 303
12
votes
6 answers
Do Containers Have An OS?
I know that containers use the host's kernel and from what I understand , that's the reason we do not need an OS.
My questions are (and I couldn't find any good explanation online) :
1) If that's the case , hoe do we get a shell prompt and how do…
John Doe
- 525
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
- 404
12
votes
1 answer
How to deal with missing packages from ubi-8-appstream?
I'm looking for best practices with Red Hat's sponsored container images: Universal Base Image, when we need to deploy application using this containers.
A lot of third party apps requires packages from AppStream, and there's clearly a gap between…
Vinícius Ferrão
- 5,870
11
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
- 263