From 417e75b470628e43623370c4c4d1d5849a3adfef Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:17:21 +0900 Subject: [PATCH] =?UTF-8?q?Docker=E3=81=A7Alpine=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=81=AA=E3=81=8FDebian=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(#8966)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Debian * CHANGELOG * Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ Dockerfile | 28 ++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cbc10b74..db229f539a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ You should also include the user name that made the change. --> +## 12.x.x (unreleased) + +### Improvements + +### Bugfixes +- Fix Docker doesn't work @mei23 + Still not working on arm64 environment. (See 12.112.0) + ## 12.112.1 (2022/07/07) same as 12.112.0 diff --git a/Dockerfile b/Dockerfile index 33d5faad12..81dc726375 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,24 @@ -FROM node:18.0.0-alpine3.15 AS base +FROM node:16.15.1-bullseye AS builder ARG NODE_ENV=production WORKDIR /misskey -ENV BUILD_DEPS autoconf automake file g++ gcc libc-dev libtool make nasm pkgconfig python3 zlib-dev git - -FROM base AS builder - COPY . ./ -RUN apk add --no-cache $BUILD_DEPS && \ - git submodule update --init && \ - yarn install && \ - yarn build && \ - rm -rf .git +RUN apt-get update +RUN apt-get install -y build-essential +RUN git submodule update --init +RUN yarn install +RUN yarn build +RUN rm -rf .git -FROM base AS runner +FROM node:16.15.1-bullseye-slim AS runner -RUN apk add --no-cache \ - ffmpeg \ - tini +WORKDIR /misskey -ENTRYPOINT ["/sbin/tini", "--"] +RUN apt-get update +RUN apt-get install -y ffmpeg tini COPY --from=builder /misskey/node_modules ./node_modules COPY --from=builder /misskey/built ./built @@ -32,5 +28,5 @@ COPY --from=builder /misskey/packages/client/node_modules ./packages/client/node COPY . ./ ENV NODE_ENV=production +ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["npm", "run", "migrateandstart"] -