oliverdavies.uk/tools/docker/images/Dockerfile

24 lines
483 B
Docker
Raw Normal View History

2021-07-03 22:00:45 +00:00
FROM opdavies/sculpin-serve AS app
2021-07-24 19:38:35 +00:00
FROM app AS build
2021-07-03 22:00:45 +00:00
WORKDIR /app
COPY composer.* ./
2021-07-24 19:38:35 +00:00
RUN composer install --no-dev
2021-07-03 22:00:45 +00:00
COPY app app
COPY source source
2021-07-24 19:38:35 +00:00
RUN sculpin generate --env prod
2021-07-03 22:00:45 +00:00
FROM node:14 AS assets
2021-07-24 19:38:35 +00:00
WORKDIR /app
2021-07-03 22:00:45 +00:00
COPY package.json .
COPY package-lock.json .
RUN npm ci
COPY . .
RUN npm run production
2021-07-24 19:38:35 +00:00
FROM nginx:1 AS production
COPY tools/docker/images/nginx/root/ /
WORKDIR /usr/share/nginx/html
COPY --from=build /app/output_prod ./
COPY --from=assets /app/source/build build