Files
ctf/2026/cscg/misc/CS_Sript_Time/Dockerfile
2026-03-09 21:44:25 +01:00

22 lines
466 B
Docker
Executable File

FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:3fcf6f1e809c0553f9feb222369f58749af314af6f063f389cbd2f913b4ad556 AS build
COPY flag /flag
COPY readflag /readflag
RUN chown 0:0 /readflag \
&& chmod u+s /readflag \
&& chown 0:0 /flag \
&& chmod 400 /flag
WORKDIR /app
# Copy everything
COPY cs-script-time ./cs-script-time
# Restore as distinct layers
WORKDIR cs-script-time
RUN dotnet restore
# Build and publish a release
ENTRYPOINT ["dotnet", "run"]