Created
September 18, 2017 05:13
-
-
Save paulredmond/de59edf6a42b8c3fbf90711ca7535523 to your computer and use it in GitHub Desktop.
Adding a volume - a Docker Compose file for an example Laravel project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: .docker/Dockerfile | |
image: laravel-docker | |
ports: | |
- 8080:80 | |
volumes: | |
- .:/srv/app |
I think there's an error in this line:
dockerfile: .docker/Dockerfile
shouldn't it be:
dockerfile: .docker/php/Dockerfile
?
Nope, you have a mistake in your file tree view, which I've used to duplicate, it has a php
folder under .docker
folder.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker-compose up
Removing laravel-docker_app_1
Recreating 71e74e7a42a5_laravel-docker_app_1 ... error
ERROR: for 71e74e7a42a5_laravel-docker_app_1 Cannot start service app: b'Mounts denied: \r\nThe path /Users/rossi/Docker/laravel-docker\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
what is the problem on this point. I have copied your code only.