From f1abc80e53394b4b663d2000aee9ea5698d0ebc7 Mon Sep 17 00:00:00 2001 From: Trung Le Date: Sat, 4 Dec 2021 21:31:26 +0700 Subject: [PATCH] refactor: support apprise in main image --- Dockerfile | 7 +++++++ Dockerfile.apprise | 30 ------------------------------ 2 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 Dockerfile.apprise diff --git a/Dockerfile b/Dockerfile index ff40d7a..0b06f3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,13 @@ RUN apk add --no-cache --virtual build-deps \ # App stage FROM node:16-alpine3.12 as app +# Install apprise +RUN apk add --no-cache \ + python3=~3.8 \ + py3-pip=~20.1 \ + py3-cryptography=~2.9 \ + && pip3 --no-cache-dir install apprise==0.9.6 + WORKDIR /app COPY . /app COPY --from=builder /app/node_modules ./node_modules diff --git a/Dockerfile.apprise b/Dockerfile.apprise deleted file mode 100644 index 0b06f3b..0000000 --- a/Dockerfile.apprise +++ /dev/null @@ -1,30 +0,0 @@ -# Builder stage -FROM node:16-alpine3.12 as builder -# Install dependencies for building node modules -# python3, g++, make: required by node-gyp -# git: required by npm -WORKDIR /app -COPY ./package.json ./package.json -RUN apk add --no-cache --virtual build-deps \ - python3=~3.8 \ - make=~4.3 \ - g++=~9.3 \ - git=~2.26 \ - && npm install --only=production \ - && apk del build-deps - -# App stage -FROM node:16-alpine3.12 as app - -# Install apprise -RUN apk add --no-cache \ - python3=~3.8 \ - py3-pip=~20.1 \ - py3-cryptography=~2.9 \ - && pip3 --no-cache-dir install apprise==0.9.6 - -WORKDIR /app -COPY . /app -COPY --from=builder /app/node_modules ./node_modules - -CMD ["npm", "start", "--no-update-notifier"]