I am trying to create Docker file for my Laravel rest Api with Vue.js in the backend Docker file when I tried to run php artisan serve I am getting the error below.
Could not open input file: artisan The command 'php artisan serve' returned a non-zero code: 1
FROM php:7.2.19-fpm
RUN mkdir ./my-project/
WORKDIR /my-project
COPY . ./my-project/
RUN apt-get update
RUN cd my-project
FROM composer:1.7 as vendor
COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
RUN ["php", "artisan", "serve"]
EXPOSE 8000
FROMnegates theWORKDIR? Could you try it out? Also the copy probably - online ThomasFROM composer...line has any effect in this Dockerfile. Specifying a newFROMimage starts anew with just the contents of that base image. Usually this is used for a multi-stage build where youCOPY --from=...artifacts that got built in an earlier stage. - David Maze