1
0
Fork 0

Fix Docker

pull/17/head
Ambrose Chua 2021-05-07 22:15:50 +08:00
parent 117a99ff9a
commit 8672207a2c
5 changed files with 17 additions and 42 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.git
Dockerfile*

View File

@ -1,16 +1,16 @@
FROM node:9-stretch FROM node:16-buster
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y build-essential zip unzip \ && apt-get install -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/* build-essential zip unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . /src COPY . /usr/local/share/file-manager
RUN cd /usr/local/share/file-manager \
RUN cd /src \ && npm install .
&& yarn install \
&& yarn cache clean
VOLUME /data VOLUME /data
WORKDIR /data WORKDIR /data
CMD ["node", "/src/index.js"] CMD ["node", "/usr/local/share/file-manager/index.js"]

View File

@ -1,19 +1,11 @@
FROM registry.makerforce.io/ambrose/env FROM serverwentdown/env:alpine-node
USER root COPY . /usr/local/share/file-manager
RUN cd /usr/local/share/file-manager \
RUN apk add --no-cache \ && sudo npm install .
build-base \
python2
COPY . /usr/local/fm
RUN cd /usr/local/fm \
&& /home/ambrose/.local/bin/yarn install \
&& /home/ambrose/.local/bin/yarn cache clean
USER ambrose USER ambrose
ENV SHELL="zsh -l" ENV SHELL="zsh -l"
CMD ["node", "/usr/local/fm/index.js"] CMD ["node", "/usr/local/share/file-manager/index.js"]

View File

@ -1,19 +0,0 @@
FROM registry.makerforce.io/ambrose/pwn
USER root
RUN apk add --no-cache \
build-base \
python2
COPY . /usr/local/fm
RUN cd /usr/local/fm \
&& /home/ambrose/.local/bin/yarn install \
&& /home/ambrose/.local/bin/yarn cache clean
USER ambrose
ENV SHELL="zsh -l"
CMD ["node", "/usr/local/fm/index.js"]

View File

@ -36,7 +36,7 @@ app.engine("handlebars", hbs({
helpers: { helpers: {
either: (a, b, options) => { either: (a, b, options) => {
if (a || b) { if (a || b) {
return options.fn(); return options.fn(this);
} }
}, },
filesize: filesize, filesize: filesize,