Skip to content
Snippets Groups Projects
Unverified Commit 9314ceae authored by Takuya Yoshida's avatar Takuya Yoshida Committed by GitHub
Browse files

Improve Dockerfile (#9105)


* Improve Dockerfile

* Update base image

* Add copy layer

* Delete unused RUN

* Update Dockerfile

Co-authored-by: default avatarAcid Chicken (硫酸鶏) <root@acid-chicken.com>

Co-authored-by: default avatarAcid Chicken (硫酸鶏) <root@acid-chicken.com>
parent 69087f22
No related branches found
No related tags found
No related merge requests found
......@@ -2,23 +2,35 @@ FROM node:18.12.1-bullseye AS builder
ARG NODE_ENV=production
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential
WORKDIR /misskey
COPY [".yarnrc.yml", "package.json", "yarn.lock", "./"]
COPY [".yarn", "./.yarn"]
COPY ["scripts", "./scripts"]
COPY ["packages/backend/package.json", "./packages/backend/"]
COPY ["packages/client/package.json", "./packages/client/"]
COPY ["packages/sw/package.json", "./packages/sw/"]
RUN yarn install --immutable
COPY . ./
RUN apt-get update
RUN apt-get install -y build-essential
RUN git submodule update --init
RUN yarn install --immutable
RUN yarn build
RUN rm -rf .git
FROM node:18.12.1-bullseye-slim AS runner
WORKDIR /misskey
RUN apt-get update
RUN apt-get install -y ffmpeg tini
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg tini \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /misskey/.yarn/install-state.gz ./.yarn/install-state.gz
COPY --from=builder /misskey/node_modules ./node_modules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment