Category : dockerfile

#change ownership of our applications RUN chown -R www-data:www-data /var/www/html/storage RUN chown -R www-data:www-data /var/www/html RUN chown -R www-data:www-data /var/www/html/bootstrap/cache RUN chmod -R 755 /var/www/html/storage RUN chmod -R 755 /var/www/html/bootstrap/cache These are the above commands I added in my dockerfile to avoid permission error but the issue is when i run this dockerfile in my ..

Read more

I’m trying to add sqlpackage to a Laravel Sail Docker. While this is normally not really difficult, Sail makes it kinda hard. I have the following section in my Dockerfile RUN curl -L https://go.microsoft.com/fwlink/?linkid=2157202 -o /usr/local/bin/sqlpackage.zip RUN mkdir /usr/local/bin/sqlpackage RUN unzip /usr/local/bin/sqlpackage.zip -d /usr/local/bin/sqlpackage RUN rm /usr/local/bin/sqlpackage.zip RUN echo "export PATH="$PATH:$HOME/usr/local/bin/sqlpackage"" >> /home/sail/.bashrc RUN chmod ..

Read more

I am quite new to Linux and Docker. It is good that Sail manages everything for me! But I would like to allow the debugging in VSCode. I have added in my windows laravel folder /docker/8.0/php.ini [XDebug] xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_host = host.docker.internal xdebug.remote_port = 9001 I have added this in my ..

Read more

I have a Docker environment running Laravel and I want to get laravel-websockets working. When I visit here: http://localhost:8000/laravel-websockets I get the following error: Dev tools gives me the following: WebSocket connection to ‘ws://localhost:6001/app/local?protocol=7&client=js&version=4.3.1&flash=false’ failed: Connection closed before receiving a handshake response I’ve got the following docker-compose.yaml: version: "3.8" services: server: build: context: . dockerfile: ..

Read more

I Set Up Laravel, Nginx, and MySQL with Docker Compose in order to deploy my laravel application. I want to set up the owner for the folder /var/www and try this in my dockerfile # Copy existing application directory permissions COPY –chown=www-data:www-data . /var/www RUN chmod -R 775 /var/www But that not set up the ..

Read more

I try to build a Laravel app and i have an error when i try to build the docker image My docker file: FROM php:7.3-fpm COPY composer.lock composer.json /var/www/ COPY database /var/www/database WORKDIR /var/www RUN apt-get update && apt-get -y install git && apt-get -y install zip RUN php -r "copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);" && php -r ..

Read more