Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
foxminchan committed Sep 30, 2023
1 parent 954c2bd commit 383ef0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions apps/Profio.Website/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["Directory.Build.props", "."]
COPY ["Directory.Build.targets", "."]
COPY ["apps/Profio.Website/Profio.Website.csproj", "apps/Profio.Website/"]
RUN dotnet restore "apps/Profio.Website/Profio.Website.csproj"
COPY . .
Expand Down
6 changes: 4 additions & 2 deletions apps/cms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ WORKDIR /usr/src/app
COPY dist/apps/cms/package*.json ./
RUN npm install --only=production -f

RUN mkdir /temp_copy
COPY dist/apps/cms/.next /temp_copy

FROM docker.io/node:lts-alpine as runner
RUN apk add --no-cache dumb-init
ENV NODE_ENV production
Expand All @@ -15,8 +18,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
WORKDIR /usr/src/app
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=deps /usr/src/app/package.json ./package.json
COPY dist/apps/cms/public ./public
COPY dist/apps/cms/.next ./.next
COPY --from=deps /temp_copy/.next ./.next
RUN chown -R node:node .
USER node
EXPOSE 3000
Expand Down

0 comments on commit 383ef0b

Please sign in to comment.