-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (21 loc) · 991 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ARG ALPINE_VERSION=3.16
ARG NODE_VERSION=18.12.1
FROM node:$NODE_VERSION-alpine$ALPINE_VERSION AS node
FROM php:8.1-cli-alpine$ALPINE_VERSION AS php-cli
RUN apk add php yarn make perl --no-cache
WORKDIR /app
RUN apk add --no-cache libstdc++
COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
COPY package.json yarn.lock webpack.config.js .eslintrc.js .eslintignore .stylelintignore stylelint.config.js ./
RUN yarn install
RUN rm -rf node_modules
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY composer.json ./
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer install --prefer-dist --no-progress --no-suggest --no-interaction --no-plugins --ignore-platform-reqs
COPY dev/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["php"]