add timezone in docker container and force before hangfire start

This commit is contained in:
Suphonchai Phoonsawat 2025-03-08 10:53:24 +07:00
parent 7ba9a6df5a
commit 772c9482aa
2 changed files with 143 additions and 134 deletions

View file

@ -1,6 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
# ตั้งค่า TimeZone ใน Container
ENV TZ=Asia/Bangkok
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
EXPOSE 80
EXPOSE 443