Questions tagged [docker-container]

Docker Containers are the core of the docker platform in which programs and applications can be packaged and run in simulated environments.

Docker containers are the core of the docker program in which programs and applications can run in simulated environments.

These containers serve as a way to simulate code that would otherwise cause irreversible changes to a systems hardware. The difference between this and a virtual machine is that the docker container does not run code on the same level as the virtual machine on top of the fact that it is a lot more portable.

Docker containers can be loaded with any type of environment, even your currently used machine, or serve as simple tool boxes for your file sytems.

For more info, see the official documentation of a docker container.

863 questions
32
votes
1 answer

How are intermediate containers formed?

I would like to understand the execution steps involved in building Docker Images using Dockerfile. Couple of questions I have listed down below. Please help me in understanding the build process. Dockerfile content #from base image FROM…
Here_2_learn
  • 3,823
  • 8
  • 40
  • 64
30
votes
4 answers

pause vs stop in docker

I am trying to understand what is the difference between the commands docker stop ContainerID and docker pause ContainerID. According to this page both of them are used to pause an existing Docker container.
ibodi
  • 994
  • 2
  • 16
  • 32
29
votes
6 answers

Docker port forwarding not working

I have setup Docker container for access my machine docker container to another machine in local. Create a container below command: docker run -it -d --name containerName -h www.myhost.net -v /var/www/html -p 7000:8000 --net mynetwork --ip…
Rajkumar .E
  • 964
  • 2
  • 12
  • 33
27
votes
6 answers

Update max_map_count for ElasticSearch docker container Mac host

I'm using this container to start elasticsearch in docker. In accordance with the manual I have to update max_map_count to start the container sudo sysctl -w vm.max_map_count=262144 but.. I can update it in my host (container) AFTER I start it…
Alexey Strakh
  • 10,508
  • 17
  • 76
  • 146
25
votes
3 answers

Can you explain Docker with a practical example/case?

I have read this and the intro docs on Docker.io and I like the concept it presents. But, can you help me understand it a little better? Can you give me some practical examples and/or case studies on how Docker is used and when it makes sense to…
Ion
  • 973
  • 2
  • 12
  • 17
23
votes
3 answers

Is it possible to start a stopped container from another container

There are two containers A and B. Once container A starts, one process will be executed, then the container will stop. Container B is just an web application (say expressjs). Is it possible to kickstart A from container B ?
tony.0919
  • 947
  • 4
  • 12
  • 26
20
votes
3 answers

AWS ECS Fargate Container Healthcheck command

I am trying to setup aws ecs fargate deployment configuration. I was able to run containers without container health check. But, I want to run container health checks too. I tried all possible scenarios to achieve this. But, no luck. i tried with…
Arjun
  • 403
  • 2
  • 8
  • 22
19
votes
2 answers

Docker container with entrypoint variable expansion and CMD parameters

I want to create a Docker Image that acts as an executable for which the user passes a token as an environment variable. The executable has sub commands that the user should pass via dockers CMD (think of git with authentication via Env). However,…
feob
  • 1,672
  • 1
  • 18
  • 30
17
votes
4 answers

How to find all image tags of a running Docker container?

I have a bunch of Docker containers running on a server and I used the "latest" tag or no tag at all for all of them. Now I want to freeze the image versions, but I have no idea when I pulled these images, so I can't tell which version "latest" is…
Forivin
  • 12,200
  • 21
  • 77
  • 171
17
votes
3 answers

Huge files in Docker containers

I need to create a Docker image (and consequently containers from that image) that use large files (containing genomic data, thus reaching ~10GB in size). How am I supposed to optimize their usage? Am I supposed to include them in the container…
Eleanore
  • 1,628
  • 3
  • 16
  • 28
16
votes
2 answers

docker view directory within container

I'm trying to copy some files from my docker container to my localhost, I read the documentation that the way to do this is docker cp 'container':path/to/file dest/path But this requires I know the path and directory within the container that I…
Meir Snyder
  • 629
  • 1
  • 6
  • 14
14
votes
1 answer

Docker stats with CPU percentage more than 100

I have a question about docker stats command if anyone can help me. I am new in Docker area and I want to monitor the cpu usage of a docker container. The physical machine has 8 cores (CPU0...CPU7). I already create a container and limit its cpu…
SMA
  • 175
  • 1
  • 2
  • 10
14
votes
1 answer

Is it possible to take thread dump of a java process in the container from the host?

My java process is running inside the container. Of course I can see that process on host machine and see its pid as well. If jdk is not installed on the cluster but on the host, can I run jstack from the host against the java process in the docker…
hobgoblin
  • 725
  • 6
  • 16
14
votes
2 answers

Restart Docker Containers when they Crash Automatically

I want to restart a container if it crashes automatically. I am not sure how to go about doing this. I have a script docker-compose-deps.yml that has elasticsearch, redis, nats, and mongo. I run this in the terminal to set this up: docker-compose…
daveskylark
  • 2,016
  • 3
  • 13
  • 28
13
votes
4 answers

docker swarm - how to balance already running containers in a swarm cluster?

I have docker swarm cluster with 2 nodes on AWS. I stopped the both instances and initially started swarm manager and then worker. Before stopped the instances i had a service running with 4 replicas distributed among manager and worker. When i…
1
2
3
57 58