From 71d2368ca4afeca747500933c1c99fc867d49531 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Tue, 16 Nov 2021 22:10:10 +0800 Subject: [PATCH] fix: Remove unnecessary packages from container --- .dockerignore | 1 + Dockerfile | 12 +++--------- package-lock.json | 4 ++-- package.json | 2 +- rootowned/hi | 0 5 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 rootowned/hi diff --git a/.dockerignore b/.dockerignore index 3c6b452..cf38481 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,5 @@ node_modules/ .github/ .gitignore Dockerfile* +LICENSE README.md diff --git a/Dockerfile b/Dockerfile index db29729..5a36be9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,12 @@ FROM node:16-bullseye -RUN apt-get update \ - && apt-get install -y \ - build-essential zip unzip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +ENV NODE_ENV=production COPY . /usr/local/share/file-manager RUN cd /usr/local/share/file-manager \ - && npm install . + && npm install . \ + && rm -rf ~/.npm ~/.cache -VOLUME /data WORKDIR /data -ENV NODE_ENV=production - CMD ["node", "/usr/local/share/file-manager/index.js"] diff --git a/package-lock.json b/package-lock.json index 02ca7b4..5a57f8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "file-manager", - "version": "0.2.0", + "version": "0.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "file-manager", - "version": "0.2.0", + "version": "0.2.4", "dependencies": { "@primer/octicons": "^16.1.1", "archiver": "^5.3.0", diff --git a/package.json b/package.json index ee90325..c7a280e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "file-manager", "description": "A simple file manager", - "version": "0.2.2", + "version": "0.2.4", "scripts": { "format": "prettier --write .", "start": "node index.js" diff --git a/rootowned/hi b/rootowned/hi deleted file mode 100644 index e69de29..0000000