Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- app:
- build:
- context: ./
- dockerfile: ./laravel/app.dockerfile
- working_dir: /var/www
- volumes:
- - ./:var/www
- environment:
- - "DB_PORT=3306"
- - "DB_HOST=database"
- web:
- build:
- context: ./
- dockerfile: ./nginx/web.dockerfile
- working_dir: /var/www
- volumes_from:
- - app
- ports:
- - 8080:80
- database:
- image: mysql:5.6
- volumes:
- - dbdata:/var/lib/mysql
- environment:
- - "MYSQL_DATABASE=homestead"
- - "MYSQL_USER=homestead"
- - "MYSQL_PASSWORD=secret"
- - "MYSQL_ROOT_PASSWORD=secret"
- ports:
- - "33061:3306"
- volumes:
- dbdata:
- --------------
- FileStructure
- docker-compose.yml
- laravel
- app.dockerfile
- nginx
- web.dockerfile
- ---------------
- Error Message
- Philipps-MBP:my-site philipp$ docker-compose up
- mysite_database_1 is up-to-date
- Creating mysite_app_1 ...
- Creating mysite_app_1 ... error
- ERROR: for mysite_app_1 Cannot create container for service app: invalid volume spec "var/www": invalid volume specification: 'var/www': invalid mount config for type "volume": invalid mount path: 'var/www' mount path must be absolute
- ERROR: for app Cannot create container for service app: invalid volume spec "var/www": invalid volume specification: 'var/www': invalid mount config for type "volume": invalid mount path: 'var/www' mount path must be absolute
- ERROR: Encountered errors while bringing up the project.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement