From 1c8b3ce451e817872b0336b9cb7e006976bc1e36 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Tue, 21 Sep 2021 10:47:55 +0800 Subject: [PATCH] no need to build sqlite and add nightly for alpine --- dockerfile | 9 +-------- dockerfile-alpine | 7 ------- package.json | 1 + 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/dockerfile b/dockerfile index 891b03d5b..826113361 100644 --- a/dockerfile +++ b/dockerfile @@ -2,13 +2,6 @@ FROM node:14-buster-slim AS build WORKDIR /app -# split the sqlite install here, so that it can caches the arm prebuilt -# do not modify it, since we don't want to re-compile the arm prebuilt again -RUN apt update && \ - apt --yes install python3 python3-pip python3-dev git g++ make && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - npm install mapbox/node-sqlite3#593c9d --build-from-source - COPY . . RUN npm install --legacy-peer-deps && \ npm run build && \ @@ -16,7 +9,7 @@ RUN npm install --legacy-peer-deps && \ chmod +x /app/extra/entrypoint.sh -FROM node:14-bullseye-slim AS release +FROM node:14-buster-slim AS release WORKDIR /app # Install Apprise, add sqlite3 cli for debugging in the future, iputils-ping for ping, util-linux for setpriv diff --git a/dockerfile-alpine b/dockerfile-alpine index 5e34d84a8..f30da5b05 100644 --- a/dockerfile-alpine +++ b/dockerfile-alpine @@ -2,13 +2,6 @@ FROM node:14-alpine3.12 AS build WORKDIR /app -# split the sqlite install here, so that it can caches the arm prebuilt -RUN apk add --no-cache --virtual .build-deps make g++ python3 python3-dev git && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - npm install mapbox/node-sqlite3#593c9d && \ - apk del .build-deps && \ - rm -f /usr/bin/python - COPY . . RUN npm install --legacy-peer-deps && \ npm run build && \ diff --git a/package.json b/package.json index 609a0a900..0a2e2f713 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "build-docker-alpine": "docker buildx build -f dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.6.0-alpine --target release . --push", "build-docker-debian": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.6.0 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.6.0-debian --target release . --push", "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push", + "build-docker-nightly-alpine": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push", "build-docker-nightly-amd64": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "setup": "git checkout 1.6.0 && npm install --legacy-peer-deps && node node_modules/esbuild/install.js && npm run build && npm prune", "update-version": "node extra/update-version.js",