All you need to do here is add context: .
and dockerfile
in your build section inside your docker-compose.yml file so that your service understands the complete directory structure.
# docker-compose.yml
version: "3"
services:
webserver:
build:
context: .
dockerfile: ./dockerfiles/webserver/Dockerfile
image: webserver:php-apache
Related Contents:
- What’s the difference between Docker Compose vs. Dockerfile
- Difference between links and depends_on in docker_compose.yml
- An error, “failed to solve with frontend dockerfile.v0”
- How to pass arguments to a Dockerfile?
- Why is Docker installed but not Docker Compose?
- Copying files to a container with Docker Compose
- Docker – image operating system “windows” cannot be used on this platform
- docker-compose, run a script after container has started?
- What is the difference between `docker-compose build` and `docker build`?
- How to pass environment variable to docker-compose up
- Failed to solve with frontend Dockerfile
- How to pass arguments within docker-compose?
- Docker COPY from ubuntu absolute path
- Copy multiple directories with one command
- How to mount local volumes in docker machine
- What is the difference between Docker Service and Docker Container?
- Why the “none” image appears in Docker and how can we avoid it
- How to pass ARG value to ENTRYPOINT?
- Docker-Compose file has yaml.scanner.ScannerError
- Docker compose with name other than dockerfile
- How are Packer and Docker different? Which one should I prefer when provisioning images?
- Difference between ‘image’ and ‘build’ within docker compose
- Can we mount sub-directories of a named volume in docker?
- Operation of the mkdir command with dockerfile
- Using docker-compose to set containers timezones
- Docker compose how to mount path from one to another container?
- Docker-compose: deploying service in multiple hosts
- How to push Docker containers managed by Docker-compose to Heroku?
- Docker COPY not updating files when rebuilding container
- Docker-compose volume mount before run
- `docker pull` returns `denied: access forbidden` from private gitlab registry
- Error in docker: network “path” declared as external, but could not be found
- where should I put docker-compose.yml
- Is Docker Compose suitable for production?
- Building common dependencies with docker-compose
- Dockerfile and docker-compose not updating with new instructions
- strconv.Atoi: parsing “”: invalid syntax
- Docker follow symlink outside context
- Docker Compose: No such image
- How to write commands with multiple lines in Dockerfile while preserving the new lines?
- docker run pass arguments to entrypoint
- alpine package py-pip missing
- Docker Compose: volumes without colon (:)
- How can I change permission of mounted volumes in docker-compose.yml from the docker-compose.yml?
- Does putting ARG at top of Dockerfile prevent layer re-use?
- What is the purpose of the file “docker.sock”?
- How to directly mount NFS share/volume in container using docker compose v3
- Docker image layer: What does `ADD file: in /` mean?
- Pulling Docker Images – Manifest not found
- Is it possible to cache multi-stage docker builds?