feat: consolidate FreeRADIUS and web controller into a single Docker image with unified entrypoint orchestration
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Failing after 32s
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Failing after 32s
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
USER $APP_UID
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
USER root
|
||||
|
||||
# Install FreeRADIUS, PostgreSQL module, and utility packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
freeradius \
|
||||
freeradius-postgresql \
|
||||
freeradius-utils \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create symlink so both /etc/raddb and /etc/freeradius/3.0 work
|
||||
RUN ln -sf /etc/freeradius/3.0 /etc/raddb
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
EXPOSE 1812/udp
|
||||
EXPOSE 1813/udp
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
@@ -19,5 +32,16 @@ RUN dotnet publish "./radiuscontroller.csproj" -c $BUILD_CONFIGURATION -o /app/p
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
|
||||
# Copy pre-configured FreeRADIUS PostgreSQL rules & EAP authentication config
|
||||
COPY raddb/clients.conf /etc/freeradius/3.0/clients.conf
|
||||
COPY raddb/mods-enabled/sql /etc/freeradius/3.0/mods-enabled/sql
|
||||
COPY raddb/sites-enabled/default /etc/freeradius/3.0/sites-enabled/default
|
||||
COPY raddb/sites-enabled/inner-tunnel /etc/freeradius/3.0/sites-enabled/inner-tunnel
|
||||
|
||||
# Copy published application and entrypoint script
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "radiuscontroller.dll"]
|
||||
COPY radiuscontroller/entrypoint.sh /app/entrypoint.sh
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user