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
4 days ago
FROM node:alpine AS base
4 days ago
WORKDIR /app
COPY package.json package-lock.json ./
4 days ago
FROM base AS deps
4 days ago
RUN npm install
4 days ago
FROM deps AS build
4 days ago
COPY . .
RUN npm run build
FROM base AS runtime
4 days ago
COPY --from=deps /app/node_modules ./node_modules
4 days ago
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
4 days ago
CMD node ./dist/server/entry.mjs