From d810a74d707325eaba714c4f52e2ff46733aeb65 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 22 Nov 2023 16:12:15 +0800 Subject: [PATCH] Move rootless images to an another set (#4052) --- docker/dockerfile | 9 ++++++++- package.json | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/dockerfile b/docker/dockerfile index 1993c1045..572c732e0 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -42,13 +42,20 @@ HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD ext ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["node", "server/server.js"] +############################################ +# Rootless Image +############################################ +FROM release AS rootless + ############################################ # Mark as Nightly ############################################ FROM release AS nightly -USER node RUN npm run mark-as-nightly +FROM nightly AS nightly-rootless +USER node + ############################################ # Build an image for testing pr ############################################ diff --git a/package.json b/package.json index be1fc7a5a..2839bce27 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,9 @@ "build-docker-slim": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:2-slim -t louislam/uptime-kuma:$VERSION-slim --target release --build-arg BASE_IMAGE=louislam/uptime-kuma:base2-slim . --push", "build-docker-full": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:2 -t louislam/uptime-kuma:$VERSION --target release . --push", "build-docker-nightly": "node ./extra/test-docker.js && npm run build && docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly2 --target nightly . --push", + "build-docker-slim-rootless": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:2-slim-rootless -t louislam/uptime-kuma:$VERSION-slim-rootless --target rootless --build-arg BASE_IMAGE=louislam/uptime-kuma:base2-slim . --push", + "build-docker-full-rootless": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:2-rootless -t louislam/uptime-kuma:$VERSION-rootless --target rootless . --push", + "build-docker-nightly-rootless": "node ./extra/test-docker.js && npm run build && docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly2-rootless --target nightly-rootless . --push", "build-docker-nightly-local": "npm run build && docker build -f docker/dockerfile -t louislam/uptime-kuma:nightly2 --target nightly .", "build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test2 --target pr-test2 . --push", "upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",