mirror of https://github.com/Lissy93/dashy.git
🐳 Updates comments in Dockerfile
This commit is contained in:
parent
94e6190053
commit
cde8060e23
|
@ -1,9 +1,10 @@
|
||||||
FROM node:16.13.2-alpine AS BUILD_IMAGE
|
FROM node:16.13.2-alpine AS BUILD_IMAGE
|
||||||
|
|
||||||
|
# Set the platform to build image for
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
||||||
|
|
||||||
# Install additional tools needed on arm64 and armv7
|
# Install additional tools needed if on arm64 / armv7
|
||||||
RUN \
|
RUN \
|
||||||
case "${TARGETPLATFORM}" in \
|
case "${TARGETPLATFORM}" in \
|
||||||
'linux/arm64') apk add --no-cache python3 make g++ ;; \
|
'linux/arm64') apk add --no-cache python3 make g++ ;; \
|
||||||
|
@ -23,7 +24,7 @@ COPY . ./
|
||||||
# Build initial app for production
|
# Build initial app for production
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# Build the final image
|
# Production stage
|
||||||
FROM node:16.13.2-alpine
|
FROM node:16.13.2-alpine
|
||||||
|
|
||||||
# Define some ENV Vars
|
# Define some ENV Vars
|
||||||
|
@ -44,8 +45,8 @@ COPY --from=BUILD_IMAGE /app ./
|
||||||
ENTRYPOINT [ "/sbin/tini", "--" ]
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
||||||
CMD [ "yarn", "build-and-start" ]
|
CMD [ "yarn", "build-and-start" ]
|
||||||
|
|
||||||
# Expose given port
|
# Expose the port
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
# Run simple healthchecks every 5 mins, to check the Dashy's everythings great
|
# Run simple healthchecks every 5 mins, to check that everythings still great
|
||||||
HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check
|
HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check
|
||||||
|
|
Loading…
Reference in New Issue