Skip to content

Commit c4033fe

Browse files
Refactor Dockerfile
1 parent ba11128 commit c4033fe

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Dockerfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ FROM php
33
RUN apt-get update && apt-get install -y libzip-dev
44
RUN docker-php-ext-install pdo pdo_mysql zip
55

6-
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
7-
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
8-
&& php -r "unlink('composer-setup.php');"
9-
10-
RUN curl -fsSL https://nodistro.nodesource.com/setup_22.12.0 | bash - \
11-
&& apt-get install -y nodejs npm
6+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
127

138
WORKDIR /app
149

@@ -17,9 +12,5 @@ COPY . .
1712
RUN composer install
1813
RUN cp .env.example .env
1914
RUN php artisan key:generate
20-
RUN npm ci
21-
RUN npm run build
22-
23-
RUN > database/database.sqlite
2415

2516
CMD ["bash", "-c", "php artisan migrate --seed && make start"]

0 commit comments

Comments
 (0)