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
I like this simpleness and conciseness. It also worked with postgresql as well with minimum modification.
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
Best video and is very knowledgeable. Thank you so much.
Great video
what about adding Vite? Seems it can not find PHP excuteable…
Why don't use Laravel Sail instead?
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?
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
what is this error
hllo andrew i am gtting this error whil using wsl in windows
Thank you for the update!
unfortunately i am not able to run composer on windows following the video… Could you please do a video for windows?
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
can you add valet too ?
could you make a followup video on how to implement custom domains and HTTPS?
Thanks for the lesson!
for Linux users, spesifically Red Hat Linux and subsidiaries, you may want to try Podman instead
thanks 🙂
Having some issues with laravel mix and node-sass .. inside the npm container. Is it working for everyone? npm install fails
how to add vhosts
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
Fantastic. This is really good stuff. Gotta check out that $29 course to get the deployment part down.
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
you save my life! thank you bro 🙂
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?
Thats awesome. Thanks man!
Hello Andrew, Greetings from Nicaragua, these are the best tutorials about docker I'd ever seen, thank you for sharing!!
Thanks for this tutorial, but why does the database data clear after you run docker down?
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?
Hello,
I been working for a few months with your Docker Tutorial and after all this time I realize that my PHP is really slow (I have it under Linux 20.04) any ideas to make it faster?
The best docker tutorial i have seen so far.
Thank you!
Can you make a tutorial on how to add SSL and set up a virtual host? TIA
Hii Andrew,
This was extremely helpful for quick setup. Thanks
If you get a chance, can you do a video on how to connect this to Travis CI, thanks
I'm not sure I understand why you need a separate container for artisan, it's already there in your php container isn't it?
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.
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
GREAT JOB! And for the record, if you plan to install Laravel 8, you will need to set the php:7.3-fpm-alpine at your Dockerfile