Skip to content

Commit 80e4ca9

Browse files
committed
Remove unnecessary layers in dockerfiles
1 parent 2b322d9 commit 80e4ca9

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ COPY . /app
66

77
WORKDIR ${FOLDER}
88

9-
# Debug: List files to see what was copied
10-
RUN ls -la
11-
RUN ls -la *.csproj || echo "No .csproj files found"
12-
13-
# Try to publish with explicit project file
149
RUN dotnet publish component-blazor.csproj -c Release -o out
1510

1611
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
@@ -24,4 +19,5 @@ COPY --from=build ${FOLDER}/out ./
2419
EXPOSE 5054
2520

2621
ENV ASPNETCORE_URLS=http://+:5054
22+
2723
CMD ["dotnet", "component-blazor.dll"]

Dockerfile.dev

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ COPY --chown=1000:1000 . /app
66

77
WORKDIR $FOLDER
88

9-
# Create directory for data protection keys
10-
RUN mkdir -p /tmp/keys && chown 1000:1000 /tmp/keys
11-
129
USER 1000:1000
1310

1411
EXPOSE 5054
1512

16-
# Environment variables for Docker development
1713
ENV ASPNETCORE_URLS=http://+:5054
14+
1815
ENV ASPNETCORE_ENVIRONMENT=Development
16+
1917
ENV ASPNETCORE_HTTPS_PORT=""
2018

2119
CMD [ "dotnet", "watch", "--no-launch-profile"]

0 commit comments

Comments
 (0)