Skip to content

Commit

Permalink
Use BUILDPLATFORM just for backend builder
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Nov 12, 2024
1 parent 2966dff commit e76d356
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
############################################################

# Docker multi-stage build
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy AS builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy AS builder
WORKDIR /app

# Copy csproj and restore (fetch dependencies) as distinct layers.
Expand All @@ -33,8 +33,7 @@ ENV APP_FILES=${HOME}/.CombineFiles

# Install system dependencies.
RUN apt-get update \
&& apt-get install -y \
ffmpeg \
&& apt-get install -y ffmpeg \
&& rm -rf /var/lib/apt/lists/*

# Create the home directory for the new app user.
Expand All @@ -47,7 +46,7 @@ RUN usermod --uid 999 --gid app \
--comment "Docker image user" \
app

## Set up application install directory.
# Set up application install directory.
RUN mkdir $APP_HOME && \
mkdir $APP_FILES && \
# Give access to the entire home folder so the backend can create files and folders there.
Expand Down

0 comments on commit e76d356

Please sign in to comment.