laravel-with-docker-example
laravel-with-docker-example copied to clipboard
running the images
Hey,
Before anything I would like to say this is working properly as advertise, I just want to ask do you have any why I couldn't run the build images under docker run command? I think the problem is my lack of understanding on how docker & docker-compose really work.
docker images mdiproduction_laravel latest 0d0b435d1050 12 hours ago 109 MB mdiproduction_php-fpm-9000 latest 1332de80cc6b 13 hours ago 436 MB
version: '2.1'
services: laravel: build: context: ./ dockerfile: web.docker volumes: - ./:/var/www depends_on: mysqldb-5.7: condition: service_started php-fpm-9000: condition: service_started ports: - "8080:80" links: - php-fpm-9000 php-fpm-9000: build: context: ./ dockerfile: app.docker volumes: - ./:/var/www links: - mysqldb-5.7 environment: - DB_PORT=3306 - DB_HOST=mysqldb-5.7 mysqldb-5.7: image: mysql:5.7 healthcheck: test: "exit 0" environment: - MYSQL_ROOT_PASSWORD=secret - MYSQL_DATABASE=dockerApp ports: - "33061:3306"
when i run docker run mdiproduction_laravel it didn't load mysql and php-fpm, thanks
If this is sound confusing i'm sorry, may I know a minimal steps on how can I deploy this to production docker? my situation is i'm running this on a dev environment where compose-docker.yml is available I want to distribute the app on our private registry and pulled in the prod environment, the problem i have is basically how can we run this in production environment where they can only pulled the images but not the source :)
Please close this is not a bug.. I understand now that i should yank the volume directive and instead COPY the source into the container :) thanks!