mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-04 04:18:13 +10:00
- Parsers: Superpower for all (Directive, FileLine, Include, DhcpHost, Leases, Hosts) - Shared ConfParserHelpers (Token, OptionalCommentPrefix) - DnsmasqConfOptionRegistry + DnsmasqOptionKind: typed options (ConfFile, ConfDir, Domain, DhcpRange, Server, Local, Address, DhcpOption, DhcpHost, Path, Flag, etc.) - EnsureManagedConfigHostedService: append conf-dir= to main config if missing, then create managed file; DnsmasqOptions + Dockerfile comments for permissions - Renames: ConfigLine->DnsmasqConfLine, ConfigSet->DnsmasqConfigSet, etc. - Test harness: entrypoint in scripts/, prepare-test-mount improvements - Status/Reload API and UI: stdout+stderr, exit code
24 lines
804 B
Docker
24 lines
804 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
EXPOSE 8081
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
|
WORKDIR /src
|
|
COPY ["src/DnsmasqWebUI/DnsmasqWebUI.csproj", "src/DnsmasqWebUI/"]
|
|
RUN dotnet restore "src/DnsmasqWebUI/DnsmasqWebUI.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/src/DnsmasqWebUI"
|
|
RUN dotnet build "DnsmasqWebUI.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "DnsmasqWebUI.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
# Runs as root by default. For host dnsmasq + container UI: bind-mount host config dir
|
|
# and ensure the mount is writable by the container user, or run this image as root.
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
ENV ASPNETCORE_URLS=http://+:8080
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "DnsmasqWebUI.dll"]
|