You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
412 B
Docker

# https://dev.to/code42cate/how-to-dockerize-and-deploy-astro-6ll
1 week ago
FROM node:alpine AS base
1 week ago
WORKDIR /app
COPY package.json package-lock.json ./
1 week ago
FROM base AS deps
1 week ago
RUN npm install
1 week ago
FROM deps AS build
1 week ago
COPY . .
RUN npm run build
FROM base AS runtime
1 week ago
COPY --from=deps /app/node_modules ./node_modules
1 week ago
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
1 week ago
CMD node ./dist/server/entry.mjs