Skip to content

Commit 69a024d

Browse files
committed
update Dockerfile
1 parent 90be74c commit 69a024d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARG DOTNET_VERSION=9.0
2+
13
### BUILD JACRED MULTIARCH START ###
24
FROM --platform=$BUILDPLATFORM alpine AS builder
35

@@ -11,7 +13,7 @@ RUN rm -f publish.zip
1113
### BUILD JACRED MULTIARCH END ###
1214

1315
# ### BUILD MAIN IMAGE START ###
14-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
16+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-alpine
1517

1618
ENV JACRED_HOME=/home/jacred
1719
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
@@ -24,6 +26,17 @@ WORKDIR $JACRED_HOME
2426

2527
EXPOSE 9117
2628

29+
HEALTHCHECK --interval=30s \
30+
--timeout=15s \
31+
--start-period=45s \
32+
--retries=3 \
33+
--start-interval=5s \
34+
CMD wget --quiet \
35+
--timeout=10 \
36+
--tries=2 \
37+
--spider \
38+
http://localhost:9117 || exit 1
39+
2740
VOLUME [ "$JACRED_HOME" ]
2841

2942
ENTRYPOINT ["dotnet", "JacRed.dll"]

0 commit comments

Comments
 (0)