Level 73
Why would you run sail inside a docker container?
Sail is a wrapper for running a laravel development environment in docker containers.
Sail should not be used for production.
To learn more about Laravel and docker check this course
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
im trying to dockerize my laravel app i know about laravel sail and stuff but im trying to run laravel sail command from inside docker file
FROM php:7.4-cli
WORKDIR /home/
RUN apt-get update
RUN apt-get install -y git
RUN git clone #myprojecturl
WORKDIR /home/#myprojectnamehere/
RUN apt update && apt upgrade
RUN apt install curl
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install pdo pdo_mysql
RUN apt install zip unzip
RUN composer install
RUN composer global require laravel/installer
RUN php artisan cache:clear
RUN php artisan config:clear
RUN ./vendor/bin/sail --no-cache
EXPOSE 8000
CMD ./vendor/bin/sail up -d
``
i get docker not found error here since im not using sudo is there any way around it what's the correct way to use sail inside docker file
Please or to participate in this conversation.