summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorかひわし4(バージョン1) <khws4v1@gmail.com>2018-10-30 21:18:03 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-10-30 21:18:03 +0900
commiteee57c47f5ba6ef995886823826bdcb8b3cf458f (patch)
tree45345b62d64db47f45e77be30235110c4264be0d
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadsharkey-eee57c47f5ba6ef995886823826bdcb8b3cf458f.tar.gz
sharkey-eee57c47f5ba6ef995886823826bdcb8b3cf458f.tar.bz2
sharkey-eee57c47f5ba6ef995886823826bdcb8b3cf458f.zip
Use cache when default.yml update (#3042)
* Use cache when default.yml update * Install latest npm in base image
-rw-r--r--Dockerfile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index e31af0099b..77cedb6aea 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,8 +3,9 @@ FROM alpine:3.8 AS base
ENV NODE_ENV=production
RUN apk add --no-cache nodejs nodejs-npm zlib
+RUN npm i -g npm@latest
+
WORKDIR /misskey
-COPY . ./
FROM base AS builder
@@ -21,19 +22,23 @@ RUN apk add --no-cache \
pkgconfig \
libtool \
zlib-dev
-RUN npm i -g npm@latest \
- && npm i \
- && npm i -g node-gyp \
- && node-gyp configure \
+RUN npm i -g node-gyp
+
+COPY ./package.json ./
+RUN npm i
+
+COPY . ./
+RUN node-gyp configure \
&& node-gyp build \
&& npm run build
FROM base AS runner
-COPY --from=builder /misskey/built ./built
-COPY --from=builder /misskey/node_modules ./node_modules
-
RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]
+COPY --from=builder /misskey/node_modules ./node_modules
+COPY --from=builder /misskey/built ./built
+COPY . ./
+
CMD ["npm", "start"]