File tree Expand file tree Collapse file tree
Workers/Resgrid.Workers.Console Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,19 @@ WORKDIR "/src/Web/Resgrid.Web.Eventing"
2626
2727FROM build AS publish
2828ARG BUILD_VERSION
29+ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
30+ && apt-get install -y --no-install-recommends tzdata \
31+ && rm -rf /var/lib/apt/lists/*
2932RUN dotnet publish "Resgrid.Web.Eventing.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION}
3033ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait
3134RUN chmod +x /app/publish/wait
3235
3336FROM base AS final
3437WORKDIR /app
38+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
39+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
40+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
41+ ENV TZ=Etc/UTC
3542COPY --from=publish /app/publish .
3643# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND.
3744# These hardened (distroless) images have no shell, so we can't chain with "sh -c".
Original file line number Diff line number Diff line change @@ -37,12 +37,19 @@ WORKDIR "/src/Web/Resgrid.Web.Mcp"
3737
3838FROM build AS publish
3939ARG BUILD_VERSION
40+ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
41+ && apt-get install -y --no-install-recommends tzdata \
42+ && rm -rf /var/lib/apt/lists/*
4043RUN dotnet publish "Resgrid.Web.Mcp.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION}
4144ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait
4245RUN chmod +x /app/publish/wait
4346
4447FROM base AS final
4548WORKDIR /app
49+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
50+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
51+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
52+ ENV TZ=Etc/UTC
4653COPY --from=publish /app/publish .
4754# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND.
4855# These hardened (distroless) images have no shell, so we can't chain with "sh -c".
Original file line number Diff line number Diff line change @@ -37,12 +37,19 @@ WORKDIR "/src/Web/Resgrid.Web.Services"
3737
3838FROM build AS publish
3939ARG BUILD_VERSION
40+ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
41+ && apt-get install -y --no-install-recommends tzdata \
42+ && rm -rf /var/lib/apt/lists/*
4043RUN dotnet publish "Resgrid.Web.Services.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION}
4144ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait
4245RUN chmod +x /app/publish/wait
4346
4447FROM base AS final
4548WORKDIR /app
49+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
50+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
51+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
52+ ENV TZ=Etc/UTC
4653COPY --from=publish /app/publish .
4754# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND.
4855# These hardened (distroless) images have no shell, so we can't chain with "sh -c".
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ RUN apt-get update \
3232 xz-utils \
3333 gzip \
3434 passwd \
35+ tzdata \
3536 && rm -rf /var/lib/apt/lists/* \
3637 && curl -fsSL --retry 3 --retry-delay 5 "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" -o /tmp/ffmpeg.tar.xz \
3738 && curl -fsSL "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz.md5" -o /tmp/ffmpeg.tar.xz.md5 \
@@ -95,6 +96,10 @@ COPY --from=publish /usr/local/bin/ffprobe /usr/local/bin/ffprobe
9596COPY --from=publish /tmp/ttsdeps/ /usr/local/lib/tts/
9697COPY --from=publish /tmp/app-passwd /etc/passwd
9798COPY --from=publish /tmp/app-group /etc/group
99+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
100+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
101+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
102+ ENV TZ=Etc/UTC
98103COPY --from=publish /app/publish .
99104
100105ENV LD_LIBRARY_PATH="/usr/local/lib/tts"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ FROM dhi.io/dotnet:9.0.314-sdk-debian13@sha256:a3acd51de0af79878e26292b3053aab51
2020# COPY --from=node_base /usr/local/bin /usr/local/bin
2121RUN apt-get update
2222RUN apt-get install -y ca-certificates curl gnupg
23+ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
2324RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
2425RUN apt-get -y install nodejs
2526ARG BUILD_VERSION
@@ -61,6 +62,10 @@ RUN chmod +x /app/publish/wait
6162
6263FROM base AS final
6364WORKDIR /app
65+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
66+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
67+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
68+ ENV TZ=Etc/UTC
6469COPY --from=publish /app/publish .
6570# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND.
6671# These hardened (distroless) images have no shell, so we can't chain with "sh -c".
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ RUN apt-get update \
5757 libxext6 \
5858 libxrender1 \
5959 zlib1g \
60+ tzdata \
6061 && wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
6162 && dpkg -i wkhtmltox_0.12.6.1-3.bookworm_amd64.deb || apt-get install -fy \
6263 && rm -f wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
@@ -73,6 +74,11 @@ COPY --from=publish /tmp/wkdeps/ /usr/local/lib/wkhtmltopdf/
7374COPY --from=publish /etc/fonts/ /etc/fonts/
7475COPY --from=publish /usr/share/fonts/ /usr/share/fonts/
7576
77+ # # Copy the IANA timezone database. DHI/distroless bases ship without tzdata,
78+ # # so TimeZoneInfo (and TZConvert) can't resolve any zone -> TimeZoneNotFoundException.
79+ COPY --from=publish /usr/share/zoneinfo /usr/share/zoneinfo
80+ ENV TZ=Etc/UTC
81+
7682ENV LD_LIBRARY_PATH="/usr/local/lib/wkhtmltopdf"
7783
7884COPY --from=publish /app/publish .
You can’t perform that action at this time.
0 commit comments