A much better local Laravel dev environment with Docker

24
36

Want to learn more about how to develop and deploy Laravel applications with Docker? I’ve released a premium course featuring 23 videos for just $29! Check it out here:

Alternatively, you can join as a member and receive that course, along with any others I release in the future, for free:

This is a follow-up to my original local Laravel dev environment with Docker video (watch that first). For those who want a more complete containerized solution, without having to have Composer, Node, or PHP installed locally!

Join my weekly newsletter for tips on Laravel + Docker:

You’ll learn how to:

– Add Composer, NPM, and Artisan to an existing docker-compose file
– Configure those services to use the app’s root directory
– Run composer require/npm install directly through Docker

Github repo for source:

Follow me on Twitter!

Thanks Patreon supporters!
– Sam Ross

Directly support these videos @

source
docker compose , A much better local Laravel dev environment with Docker , , I980aPL-NRM , https://www.youtube.com/watch?v=I980aPL-NRM , https://i.ytimg.com/vi/I980aPL-NRM/hqdefault.jpg , 50447 , 5.00 , Want to learn more about how to develop and deploy Laravel applications with Docker? I’ve released a premium course featuring 23 videos for just $29! Check it out here:

Alternatively, you can join as a member and receive that course, along with any others I release in the future, for free:

This is a follow-up to my original local Laravel dev environment with Docker video (watch that first). For those who want a more complete containerized solution, without having to have Composer, Node, or PHP installed locally!

Join my weekly newsletter for tips on Laravel + Docker:

You’ll learn how to:

– Add Composer, NPM, and Artisan to an existing docker-compose file
– Configure those services to use the app’s root directory
– Run composer require/npm install directly through Docker

Github repo for source:

Follow me on Twitter!

Thanks Patreon supporters!
– Sam Ross

Directly support these videos @ , 1581576498 , 2020-02-13 06:48:18 , 00:10:25 , UCc07-IBVwRlOsMg2WMdd8Sg , Andrew Schmelyun , 1152 , , laravel,docker,web development,programming,coding , https://www.youtubepp.com/watch?v=I980aPL-NRM , [ad_2] , [ad_1] , https://www.youtube.com/watch?v=I980aPL-NRM, #local #Laravel #dev #environment #Docker

Previous articleTikToks So Funny They Destroyed Internet
Next articleHow to containerize Java web apps and migrate to Azure Kubernetes Services

36 COMMENTS

  1. first of all, thanks for the clear instructions, it is very useful to many new to docker like me. however, …
    I followed the docker compose you introduced, but there is 2 problem I found after I run "npm run dev"
    1. I got error (where npm run build normally run) ERR_EMPTY_RESPONSE
    2. the browser do not do the auto refresh after new code saved to the project

  2. WSL2 and Docker Desktop for Windows wasn't resolving the laraveldocker.test directory. When I changed it to laraveldockertest my volumes bind mounted fine. Before, I was getting a Path not found error during the volume creation. I tried every permutation for the volume path description I could find, quoted, non quoted, escaped, period (.) double escaped, full path name, nothing worked with the .test but taking out the period fixed it.

    I do have a question though about VSCODE. I have a PHP language checker that needs access to the php installation. Is there anyway I can access the php installation in a container for the VSCODE extension?

  3. glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {

    errno: -13,

    code: 'EACCES',

    syscall: 'scandir',

    path: '/root/.npm/_logs'

    }
    what is this error

  4. On previous video you create project with port 8088, now is 8080, what happen here?, I followed your previous edition and a I got a long error named: x16x03x01x02x00x01x00x01xFCx03x03xFBxCFxC3GxACBxC9xBBx95x9Ex1D=xA2wx7FmxxE3xEDxFBxE5xC6xB1x1FXxE3x8Cx9Fx94$xA0xE5 U$xE7.xDAx1CxE5xA05xD3xF0-xCFFxC52xAAx8DzuZ xD1xF0H+xB7VxEAx0ExAEx93x00$x13x01x13x03x13x02xC0+xC0/xCCxA9xCCxA8xC0,xC00xC0" 400 157 "-" "-"

    Something related as error due to length

  5. Hi andrew, awesome tutorial, helped me a lot with docker environments. However I have a problem when I try to implement telescope. I'm using the composer container to install laravel/telescope but the artisan container doesn't have the telescope:install command, how can I update this artisan container with the new packages that applies new commands? it's not enough to stay in the same network? thanks in advance

  6. Great tutorial, I'm trying to follow your instruction and facing the issue Laravel permission denied on storage/logs. I have set the Laravel directory with chmod all directory to 644 & all files to 755. Is that some other permission required ? I'm using Laravel 8

  7. Thank you for this great tutorial Andrew, following your instructions laravel started up correctly. But after a 'docker-compose down' and then 'docker-compose up -d site' I get the following error that I do not know how to solve:

    Traceback (most recent call last):

    File "docker-compose", line 3, in <module>

    File "composeclimain.py", line 67, in main

    File "composeclimain.py", line 126, in perform_command

    File "composeclimain.py", line 1070, in up

    File "composeclimain.py", line 1066, in up

    File "composeproject.py", line 615, in up

    File "composeservice.py", line 362, in ensure_image_exists

    File "composeservice.py", line 1125, in build

    File "site-packagesdockerapibuild.py", line 160, in build

    File "site-packagesdockerutilsbuild.py", line 31, in tar

    File "site-packagesdockerutilsbuild.py", line 100, in create_archive

    OSError: Can not read file in context: \?D:codedocker-compose-laravelsrcvendorbincarbon

    [11112] Failed to execute script docker-compose

    Can you please help me with this problem?

  8. Hi, thanks for you video.. How can I extend these commands (composer, npm…) to work with more than one laravel container? In my case I have a api and a client container, how can I choose in which container I want to run the composer/npm command?

  9. Thank you for this amazing tut @Andrew.

    But I have one curius question. Why we always start containers that will exit immediately and we will use them on demand later.

    Just like composer or npm containers, you will fined a container exited for composer and a new hash-named one is running by "run" command.

    I think it will be great if we can tag a container as "on-demand: true" to use it with "run" commands and don't start by "up" command.

  10. Hey thanks for this high quality video ! However I have some trouble, I use the `composer` service to create my laravel app like so:
    “`
    $ docker-compose run –rm composer bash
    $ composer create-project laravel/laravel
    “`
    The application is created, however the permissions aren't good, when I go to localhost:8088 I have this error
    `The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied`

    I can't find something relevant with google on how to fix this, I guess I have to set rights in the docker-compose or add a special user on my local system and docker has to "use" this said user.
    If anyone has a solution, please tell me 😀 Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here