diff --git a/Dockerfile b/Dockerfile index c41444e..5e9abf2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:hydrogen-alpine as base +FROM node:hydrogen-alpine AS base WORKDIR /usr/src/app @@ -9,7 +9,7 @@ RUN deluser --remove-home node \ && addgroup -S node -g 10000 \ && adduser -S -G node -u 10000 node -FROM base as build +FROM base AS build COPY package-lock.json ./ COPY package.json ./ @@ -20,7 +20,7 @@ RUN chmod u+x ./server.js RUN npm pack RUN tar -xzf *.tgz -FROM base as install +FROM base AS install ENV NODE_ENV=production @@ -29,7 +29,7 @@ COPY package.json ./ RUN --mount=type=cache,target=/root/.npm npm ci RUN rm package.json package-lock.json -FROM base as app +FROM base AS app COPY --from=install /usr/src/app . COPY --from=build /usr/src/app/package .