Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.47 KB | None | 0 0
  1. version: '2'
  2. services:
  3.   app:
  4.     build:
  5.       context: ./
  6.       dockerfile: ./laravel/app.dockerfile
  7.     working_dir: /var/www
  8.     volumes:
  9.      - ./:var/www
  10.     environment:
  11.      - "DB_PORT=3306"
  12.       - "DB_HOST=database"
  13.   web:
  14.     build:
  15.       context: ./
  16.       dockerfile: ./nginx/web.dockerfile
  17.     working_dir: /var/www
  18.     volumes_from:
  19.      - app
  20.     ports:
  21.      - 8080:80
  22.   database:
  23.     image: mysql:5.6
  24.     volumes:
  25.      - dbdata:/var/lib/mysql
  26.     environment:
  27.      - "MYSQL_DATABASE=homestead"
  28.       - "MYSQL_USER=homestead"
  29.       - "MYSQL_PASSWORD=secret"
  30.       - "MYSQL_ROOT_PASSWORD=secret"
  31.     ports:
  32.      - "33061:3306"
  33. volumes:
  34.   dbdata:
  35. --------------
  36. FileStructure
  37. docker-compose.yml
  38. laravel
  39.     app.dockerfile
  40. nginx
  41.     web.dockerfile
  42. ---------------
  43. Error Message
  44.  
  45. Philipps-MBP:my-site philipp$ docker-compose up
  46. mysite_database_1 is up-to-date
  47. Creating mysite_app_1 ...
  48. Creating mysite_app_1 ... error
  49.  
  50. 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
  51.  
  52. 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
  53. ERROR: Encountered errors while bringing up the project.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement