Questions tagged [docker]

Docker is an open source project that automates the deployment of applications inside software containers.

Docker is an open source project that automates the deployment of applications inside software containers. Docker extends a common container format called Linux Containers (LXC), with a high-level API providing a lightweight virtualization solution that runs processes in isolation. Docker utilizes LXC, cgroups, and the Linux kernel itself. Unlike traditional virtual machines, a Docker container does not include a separate operating system, instead it relies on the operating system’s functionality provided by the underlying infrastructure.

4147 questions
21
votes
3 answers

Why are environment variables different with `bash -c`

How come the following, i.e. echoing $PATH directly from bash -c: docker exec -i -t my_container bash -c "echo $PATH" returns a different value for $PATH than what follows, i.e. starting an interactive bash session and echoing the $PATH? docker…
Alessandro Vernet
  • 557
  • 2
  • 4
  • 9
21
votes
2 answers

How to get the true client IP for a service running inside docker

My scenario: I'd like to have my docker-based services know what IP is calling them from the web (a requirement of my application.) I'm running on a cloud VPS, debian jessie, with docker 1.12.2. I use nc in verbose mode to open port 8080. docker run…
21
votes
2 answers

Docker exec/run shell command nesting

A short introduction to the use case: I am using a docker container to run my go tests using go test ./.... This can be achieved easily using docker exec /bin/sh -c "go test ./...". Unfortunately go test ./... runs across all…
Wesley van Opdorp
  • 291
  • 1
  • 3
  • 10
21
votes
2 answers

How to debug Docker cache invalidation?

Docker has a cache, which is great, but all I see in the "docker build" output is either: ---> Using cache or the output of the command (which implies it's not using the cache). After one step in my Dockerfile (a COPY), it clearly doesn't use the…
Timmay
  • 271
  • 2
  • 5
20
votes
2 answers

how can i modify max memory-limit in php.ini in docker container

within the docker container on a MAC, I am getting a php memory error : Fatal error: Allowed memory size of 404750336 bytes exhausted (tried to allocate 266342400 bytes how can i find where the php.ini file is or how can i modify this parameter in…
Diana
  • 333
  • 1
  • 3
  • 9
20
votes
2 answers

How to delete a docker network that does not exist?

I have a docker swarm configuration with 3 nodes. There is a network that sits on only one of the nodes. On that particular node, docker network ls shows the network, docker network rm [network-id] says "Error response from daemon: network ... not…
JRoppert
  • 311
  • 1
  • 2
  • 6
20
votes
2 answers

How do I deploy a docker container and associated data container, including contents?

I'll start by admitting I'm pretty new to Docker and I may be approaching this problem from the wrong set of assumptions... let me know if that's the case. I've seen lots of discussion of how Docker is useful for deployment but no examples of how…
Kryten
  • 313
  • 1
  • 2
  • 9
19
votes
3 answers

How to move docker images to other drive in windows

I try to run the following script but dockerd is not recognized in my workstation. My OS is windows 10. Just installed the latest version of docker that is 18.09.2 It is my first time with docker.
Miguel
  • 541
  • 4
  • 7
  • 17
19
votes
4 answers

Is it a good practice to put update/upgrade statements inside the Dockerfile?

new to Docker here and I am trying to make it right. I want to create a docker container to 'deep freeze' an application created with bash scripts and a lot of dependencies, so that I don't have to maintain it as much anymore. I think docker is…
MortyAndFam
  • 301
  • 1
  • 2
  • 3
19
votes
1 answer

List containers from all nodes of docker swarm mode

We are running docker in swarm mode on a few nodes. Could not find a quick and easy way to list all containers (preferably with status) in the swarm from the manager nodes. One can see overlay networks and locally-running containers attached to…
saabeilin
  • 419
  • 1
  • 4
  • 12
19
votes
3 answers

Routing from docker containers using a different physical network interface and default gateway

Background Information I have a server with two network interfaces that is running Docker. Docker, like some virtualization tools, creates a Linux bridge interface called docker0. This interface is configured by default with an IP of 172.17.42.1 and…
user81598
19
votes
3 answers

Sharing unix socket via docker volume - permission denied

I try to share my php5-fpm socket via a volume with my nginx webserver. Fpm and nginx are running in different containers and I want to get them working via a shared volume where I place the socket file from fpm. 2014/04/13 10:53:35 [crit] 33#0: *1…
soupdiver
  • 807
  • 2
  • 9
  • 26
18
votes
6 answers

Can not access mysql docker

I am using docker-compose to create mysql container. I get host IP 172.21.0.2. But when I connect mysql. I get error: My docker-compose.yml: version: '2' services: ### Mysql container mysql: image: mysql:latest ports: -…
Quoc Dat
  • 183
  • 1
  • 1
  • 6
18
votes
3 answers

How to choose the external IP address of a Kubernetes load balancer in Google Kubernetes Engine

I'm deploying a web app using Google Kubernetes Engine and I want to make it accessible via a load balancer on an existing static IP address that I control as part of the same project in Google Cloud Platform, because the domain name I want to use…
17
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/*…