diff --git a/docker/builder-go.dockerfile b/docker/builder-go.dockerfile index 5d38cf4ec..79c1a95ba 100644 --- a/docker/builder-go.dockerfile +++ b/docker/builder-go.dockerfile @@ -8,9 +8,9 @@ ARG TARGETPLATFORM COPY ./extra/ ./extra/ # Compile healthcheck.go -RUN apt update -RUN apt --yes --no-install-recommends install curl -RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -RUN apt --yes --no-install-recommends install nodejs -RUN node -v -RUN node ./extra/build-healthcheck.js $TARGETPLATFORM +RUN apt update && \ + apt --yes --no-install-recommends install curl && \ + curl -sL https://deb.nodesource.com/setup_18.x | bash && \ + apt --yes --no-install-recommends install nodejs && \ + node ./extra/build-healthcheck.js $TARGETPLATFORM && \ + apt --yes remove nodejs diff --git a/docker/dockerfile b/docker/dockerfile index 26f70dd3b..775cec595 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -12,10 +12,13 @@ FROM louislam/uptime-kuma:base-debian AS build WORKDIR /app ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 +COPY .npmrc .npmrc +COPY package.json package.json +COPY package-lock.json package-lock.json +RUN npm ci --omit=dev COPY . . COPY --from=build_healthcheck /app/extra/healthcheck /app/extra/healthcheck -RUN npm ci --production && \ - chmod +x /app/extra/entrypoint.sh +RUN chmod +x /app/extra/entrypoint.sh ############################################ # ⭐ Main Image diff --git a/docker/dockerfile-alpine b/docker/dockerfile-alpine index ab9255f95..43f26b8bb 100644 --- a/docker/dockerfile-alpine +++ b/docker/dockerfile-alpine @@ -3,10 +3,12 @@ WORKDIR /app ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 +COPY .npmrc .npmrc +COPY package.json package.json +COPY package-lock.json package-lock.json +RUN npm ci --omit=dev COPY . . -RUN npm ci --production && \ - chmod +x /app/extra/entrypoint.sh - +RUN chmod +x /app/extra/entrypoint.sh FROM louislam/uptime-kuma:base-alpine AS release WORKDIR /app