Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Mar 8, 2024
1 parent a03efa0 commit c1b146e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions DeveMultiCompressor.ConsoleApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
# Copy compressors folder first
COPY ["DeveMultiCompressor/Compressors", "DeveMultiCompressor/Compressors"]
COPY ["DeveMultiCompressor.ConsoleApp/DeveMultiCompressor.ConsoleApp.csproj", "DeveMultiCompressor.ConsoleApp/"]
COPY ["DeveMultiCompressor/DeveMultiCompressor.csproj", "DeveMultiCompressor/"]
RUN dotnet restore "DeveMultiCompressor.ConsoleApp/DeveMultiCompressor.ConsoleApp.csproj"
COPY . .
# Make executable files without extension executable
WORKDIR "/src/DeveMultiCompressor/Compressors"
RUN apt-get update && apt-get install -y file
Expand All @@ -25,12 +27,6 @@ RUN echo "Making executable files without extension executable..." && \
fi; \
done \
' sh {} +

WORKDIR /src
COPY ["DeveMultiCompressor.ConsoleApp/DeveMultiCompressor.ConsoleApp.csproj", "DeveMultiCompressor.ConsoleApp/"]
COPY ["DeveMultiCompressor/DeveMultiCompressor.csproj", "DeveMultiCompressor/"]
RUN dotnet restore "DeveMultiCompressor.ConsoleApp/DeveMultiCompressor.ConsoleApp.csproj"
COPY . .
WORKDIR "/src/DeveMultiCompressor.ConsoleApp"
RUN dotnet build "DeveMultiCompressor.ConsoleApp.csproj" -c Release -o /app/build

Expand Down

0 comments on commit c1b146e

Please sign in to comment.