Search typeSearch syntax
tags[tag]
exact"words here"
authoruser:1234
user:me (yours)
scorescore:3 (3+)
score:0 (none)
answersanswers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
viewsviews:250
sectionstitle:apples
body:"apples oranges"
urlurl:"*.example.com"
favoritesinfavorites:mine
infavorites:1234
statusclosed:yes
duplicate:no
migrated:no
wiki:no
typesis:question
is:answer
exclude-[tag]
-apples
For more details on advanced search visit our help page
results found tagged with search options answers only user 10008173

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

78 results
relevancenewest

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

0
votes
Any kind of quotes:environment:- "SHARED_KEY=ABC#123"- 'OR=single quotes {!}'
answered Jul 27 by David Maze
2
votes
Most of the docker run options have matching Docker Compose options. In particular, docker run --security-opt maps to a security_opt: field.db:image: 'mysql:8.0'security_opt:- 'seccomp:u …
answered Oct 3 by David Maze
2
votes
The default is a system-controlled directory under /var/lib/docker. If you're in a Docker Toolbox or Docker Machine environment where Docker runs under a VM, that directory path is inside the VM. Do …
answered Jul 8 by David Maze
2
votes
Docker will only auto-populate a volume when it is first created. In the workflow you describe, when you delete and recreate the "first" container with its new image, you need to delete and recreate …
answered Dec 12 by David Maze
2
votes
The statement volumes: ['http://stackoverflow.com/:/example'] makes the parent directory of the directory containing docker-compose.yml on the host (http://stackoverflow.com/) visible inside the container at /example. Host directory bind-mount …
answered Jul 3 by David Maze
1
vote
As a general rule, never set DOCKER_HOST.Given your error message, it looks like it might be set (incorrectly) and you might see if things get better if youunset DOCKER_HOSTThe two prominent ex …
answered Aug 17 by David Maze
1
vote
In your first Dockerfile, use the COPY directive to copy your application into the image before you do things like RUN composer install. It'd look something likeFROM php:7.0-cliCOPY . /usr/src/app …
answered Jul 25 by David Maze
2
votes
One infrastructure piece you may find useful is a service registry that knows which hosts are running which services. These generally provide DNS services, so you can refer to a service by its "hostn …
answered Nov 4 by David Maze
0
votes
You should create a separate image for each part of your application. These can be based on the base image if you'd like; the Dockerfile might look likeFROM base_generic_imageCOPY dlc /usr/binCMD …
answered Aug 21 by David Maze
2
votes
When you use --net host you share the host's entire network setup and all of its interfaces. The container doesn't have its own IP address. You're in the exact same network environment as if, say, y …
answered Aug 4 by David Maze
2
votes
EXPOSE is mostly documentation. In the unusual event you docker run -P, Docker will publish all exposed ports on the host, and pick its own ports for the host ports; this won't have port conflicts, b …
answered Aug 4 by David Maze
0
votes
It's the same as running any other process on a host, Docker or not Docker: you access it via the host name or IP address of the host and the port the service is listening on (the first port of the do …
answered Nov 13 by David Maze
1
vote
You can't use volumes during image building, and in any case Docker already does the caching you're asking for. If you leave your Dockerfile as-is and don't try to add your code in volumes in the doc …
answered Oct 8 by David Maze
1
vote
Could these tasks be defined with docker-compose?No; the docker-compose.yml file only defines long-running "service" containers. There's no way to define an additional docker exec type task tha …
answered Dec 9 by David Maze
-2
votes
docker run -p 10.20.30.40:80:8888 will tell Docker to launch a container with port 80 on specifically IP address 10.20.30.40 routed to port 8888 in the container. This is out-of-the-box functionality …
answered Jul 6 by David Maze
1
vote
Docker Compose doesn't support this.There's a more-or-less standard trick for service B to wait for service A to start. If one service has a way to see the other (for instance, service A is running …
answered Jul 3 by David Maze
1
vote
In your Dockerfile, youCOPY --from=builder /lab-d/labd.tar.gz /code/labd.tar.gzWORKDIR /codeRUN tar -xzf labd.tar.gzBut then your docker-compose.yml specifiesvolumes:- ".:/code"That cau …
answered Oct 12 by David Maze
0
votes
No; Docker Compose itself is an application that uses the API. You’d need to directly run docker-compose up or something similar as a shell command if you wanted to directly use it.(You might be ab …
answered Nov 28 by David Maze
0
votes
docker-compose -p or the COMPOSE_PROJECT_NAME environment variable will manually set that prefix, rather than letting Compose decide for itself based on the directory name. This would still let you h …
answered Jul 18 by David Maze
1
vote
If you create an empty directory on the host and mount it to /var/log on the container, then /var/log in the container will be the host's empty directory. If you then try to write to /var/log/nginx/e …
answered Jul 5 by David Maze
0
votes
You can't give untrusted users the direct ability to run docker commands. For instance, anyone who can run a Docker command can rundocker run --rm -v /:/host busybox cat /host/etc/shadowand then …
answered Aug 9 by David Maze
0
votes
You can run the docker build while the old container is still running, and your downtime is limited to the changeover period.It can be helpful for a couple of reasons to put a load balancer in front …
answered Sep 25 by David Maze
4
votes
The documentation suggests that, in Docker Compose version 2 files specifically, depends_on: can be a list of strings, or a mapping where the keys are service names and the values are conditions. For …
answered Sep 13 by David Maze
2
votes
I suspect your larger problem is that the Dockerfile ends with:WORKDIR /CCMD python manage.py ...But there is nothing at all in /C, everything is (I'm guessing) in /src/C. Try insteadWORKDIR …
answered Oct 26 by David Maze
4
votes
There's three things going on here:When you run docker build or docker-compose build, your Dockerfile builds a new image containing a /usr/src/app/node_modules directory and a Node installation, bu …
answered Jun 29 by David Maze
1
vote
This isn't possible. Not only do the container and host have different umasks, but each process has its own umask. For that matter, nothing in umask(1) or umask(2) suggests that a process can't subs …
answered Nov 26 by David Maze
1
vote
If you’re deploying on a multi-host swarm (or something similar like Kubernetes or Nomad) you all but need a Docker registry. It doesn’t specifically have to be Docker Hub — quay.io, Amazon’s ECR, Go …
answered Oct 17 by David Maze
1
vote
Docker Compose will automatically create a Docker network for you (per Compose file). For inter-container DNS to work, you can't use the default Docker network but any named network will work. So yo …
answered Oct 17 by David Maze
2
votes
Docker containers are started with an entrypoint and a command; when the container actually starts they are simply concatenated together. If the ENTRYPOINT in the Dockerfile is structured like a sing …
answered Oct 15 by David Maze
1
vote
Sure, ENTRYPOINT can do that. It takes the CMD as command-line arguments. Usually your ENTRYPOINT script will want to exec "$@" to run the CMD after doing its setup, but if you're willing to take on …
answered Aug 19 by David Maze

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,