Skip to content

Commit

Permalink
fix: scene-lod build
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Jan 10, 2024
1 parent 90a54b8 commit a68ae63
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as dotnet-build

# Set the working directory in the container
WORKDIR /app

# Copy the .NET Core project file(s) into the container
COPY DCL_PiXYZ/ ./api
COPY nuget.config ./
COPY local_packages/ ./local_packages

WORKDIR /app/api

# Restore dependencies and packages
RUN dotnet publish -c Release -r win10-x64 -o ./publish --self-contained true

# Copy the rest of the code into the container
COPY DCL_PiXYZ/ ./

# Use a basic Windows Server Core image
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as base

Expand All @@ -39,14 +21,17 @@ FROM base as scene-lod-build

WORKDIR /scene-lod

COPY scene-lod-entities-manifest-builder /scene-lod
RUN if (Test-Path node_modules) { Remove-Item -Recurse -Force node_modules }

# Clear npm cache
RUN npm cache clean --force

COPY scene-lod-entities-manifest-builder/package.json /scene-lod
COPY scene-lod-entities-manifest-builder/package-lock.json /scene-lod
RUN npm ci

COPY scene-lod-entities-manifest-builder /scene-lod
RUN npm run build

RUN npm ci --only=production
# Try running npm ci with more verbose logging
RUN npm ci --only=production --verbose

# Consumer Server Build
FROM base as consumer-server-build
Expand All @@ -62,6 +47,24 @@ RUN yarn build

RUN yarn install --frozen-lockfile

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as dotnet-build

# Set the working directory in the container
WORKDIR /app

# Copy the .NET Core project file(s) into the container
COPY DCL_PiXYZ/ ./api
COPY nuget.config ./
COPY local_packages/ ./local_packages

WORKDIR /app/api

# Restore dependencies and packages
RUN dotnet publish -c Release -r win10-x64 -o ./publish --self-contained true

# Copy the rest of the code into the container
COPY DCL_PiXYZ/ ./

# FROM mcr.microsoft.com/windows/servercore as windows-runtime
FROM mcr.microsoft.com/windows/servercore:ltsc2019

Expand Down

0 comments on commit a68ae63

Please sign in to comment.