Skip to content

Commit 4b622dd

Browse files
authored
Merge pull request #24 from jongalloway/copilot/fix-23
Fix Docker build timeout caused by SSL certificate validation and missing curl
2 parents 65ec9db + d590ddc commit 4b622dd

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

NuGet.Config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
</packageSources>
6+
<config>
7+
<add key="http_proxy" value="" />
8+
<add key="https_proxy" value="" />
9+
</config>
10+
</configuration>

deployment/docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ RUN dotnet publish "NLWebNet.Demo.csproj" -c Release -o /app/publish /p:UseAppHo
2929
# Runtime stage
3030
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
3131

32-
# Create a non-root user for security
33-
RUN groupadd -r nlwebnet && useradd -r -g nlwebnet nlwebnet
32+
# Install curl for health checks and create a non-root user for security
33+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
34+
&& groupadd -r nlwebnet && useradd -r -g nlwebnet nlwebnet
3435

3536
# Set working directory
3637
WORKDIR /app
3738

3839
# Copy published application
39-
COPY --from=publish /app/publish .
40+
COPY --from=build /app/publish .
4041

4142
# Create directory for logs and ensure proper permissions
4243
RUN mkdir -p /app/logs && chown -R nlwebnet:nlwebnet /app

0 commit comments

Comments
 (0)