Category : docker

I want to install SQL server driver for php on laravel sail, after building containers Docker cannot install sql server driver. I’m getting trying to access array offset error .. docker-compose.yml version: ‘3’ services: laravel.test: build: context: ./vendor/laravel/sail/runtimes/7.4 dockerfile: Dockerfile args: WWWGROUP: ‘${WWWGROUP}’ image: sail-7.4/app extra_hosts: – ‘host.docker.internal:host-gateway’ ports: – ‘${APP_PORT:-80}:80’ environment: WWWUSER: ‘${WWWUSER}’ LARAVEL_SAIL: ..

Read more

I am trying to run a laraver project in a docker container. My dockerfile: FROM php:8.0.12-cli … # Install composer. ENV COMPOSER_ALLOW_SUPERUSER 1 RUN curl -sS https://getcomposer.org/installer | php — –install-dir=/bin –filename=composer –quiet && rm -rf /root/.composer/cache # Install git. RUN apt-get update && apt-get install -y git # Clone laravel project from repo. RUN ..

Read more

I am new to docker, I wrote this docker file and can read and upload images in storage but can not delete them via vscode, it returns readonly status, what is the problem? FROM php:7.4-fpm COPY composer.lock composer.json /var/www/ WORKDIR /var/www RUN apt-get update && apt-get install -y libonig-dev build-essential libpng-dev libjpeg62-turbo-dev libfreetype6-dev locales zip ..

Read more

I’m having trouble setting up my laravel project. I’m using the following docker-compose file to run the app and the database : version: ‘2’ services: mariadb: image: docker.io/bitnami/mariadb:10.6 environment: – MARIADB_USER=lama – MARIADB_PASSWORD=lama – MARIADB_DATABASE=lama app: image: docker.io/bitnami/laravel:8 ports: – ‘8000:8000’ environment: – DB_HOST=mariadb – DB_PORT=3306 – DB_USERNAME=lama – DB_PASSWORD=lama – DB_DATABASE=lama volumes: – ./lama:/app ..

Read more

I’m trying to dive into Laravel for the first time, but can’t seem to just get it started. I’m in a Linux environment and following the instructions on the Laravel site: https://laravel.com/docs/8.x/installation curl -s https://laravel.build/stupidApp | bash "Thank you! We hope you build something incredible. Dive in with: cd stupidApp && ./vendor/bin/sail up" So far ..

Read more

I’m trying to dive into Laravel for the first time, but can’t seem to just get it started. I’m in a Linux environment and following the instructions on the Laravel site: https://laravel.com/docs/8.x/installation curl -s https://laravel.build/stupidApp | bash "Thank you! We hope you build something incredible. Dive in with: cd stupidApp && ./vendor/bin/sail up" So far ..

Read more

I am trying to deploy my Laravel application on AWS using docker image by following given tutorial: https://medium.com/@okekedesmond/deploying-containerized-laravel-application-using-aws-ec2-instances-with-docker-and-rds-883e8f6d6245 I am stuck at first point while building docker image. Here is my Dockerfile: # Defining the base image for our project, if you understand how docker images and layers work, this should not be difficult to ..

Read more

I tried to use mongodb cache for laravel : https://github.com/jenssegers/laravel-mongodb I have a docker container for mongodb and I set all variables : MONGO_DB_HOST=mongodb MONGO_DB_PORT=27017 MONGO_DB_DATABASE=cache MONGO_DB_USERNAME=root MONGO_DB_PASSWORD=111 and I set : CACHE_DRIVER=mongodb When I tried to connect to this mongodb container : `# docker exec -it backend curl http://mongodb:27017 It looks like you are ..

Read more

ERROR: The Compose file ‘./docker-compose.yml’ is invalid because: services.mysql.ports is invalid: Invalid port ""3307":3306", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol] Using docker with Laravel sail on Laravel v8.7 trying to create a external port in Digital ocean droplet Ubuntu 20.04 Want to use multiple projects in one droplet in order to do that using separate containers but facing ..

Read more

I’m trying to set up Laravel scheduler within docker and I’m getting permission denied and I’m not sure what I’ve done wrong. error: crond[1]: crond (busybox 1.34.1) started, log level 8 crond[1]: root: Permission denied crond[1]: www: Permission denied crond[1]: root: Permission denied crond[1]: www: Permission denied docker-compose.yml version: ‘3’ services: #PHP Service app: build: ..

Read more

I’m trying to store files in my local env with Laravel 8 and sail. But I cannot get the files ! I’m working with WSL 2 and Ubuntu 20.4 Issue $request->hasFile(‘podcast_file’) always return false. My code: <form method="post" action="{{route(‘podcast.store’)}}" enctype="multipart/form-data" > @csrf <div> <input name="podcast_file" type="file">podcast’s file</input> </div> Controller: use IlluminateHttpRequest; … dd($request->hasFile(‘podcast_file’)); // false ..

Read more

public function dataTable($query) { return datatables() ->eloquent($query) ->addIndexColumn() ->addColumn(‘leave_type_id’, function ($data) { // $data is data od current row in table return $data->leaveType->name ?? ”; }) ->addColumn(‘status’, function ($data) { // $data is data od current row in table if ($data->status == 1) { return ‘<button class="m-2 btn btn-success btn-sm" type="button">Granted</button>’; // or simply return ..

Read more

I have set up windows with Docker, WSL 2 and Ubuntu 20.04 LTS When I run windows terminal curl -s "https://laravel.build/rr-backend-queue" | bash I received the following error: cmdlet Invoke-WebRequest at command pipeline position 1 Supply values for the following parameters: Uri: curl : Cannot find drive. A drive with the name ‘https’ does not ..

Read more