summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 9 insertions, 18 deletions
diff --git a/Dockerfile b/Dockerfile
index 8c655c4c4f..58e3eda119 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,27 +4,17 @@ ENV NODE_ENV=production
WORKDIR /misskey
-FROM base AS builder
+ENV BUILD_DEPS autoconf automake file g++ gcc libc-dev libtool make nasm pkgconfig python3 zlib-dev git
-RUN apk add --no-cache \
- autoconf \
- automake \
- file \
- g++ \
- gcc \
- libc-dev \
- libtool \
- make \
- nasm \
- pkgconfig \
- python3 \
- zlib-dev
+FROM base AS builder
-RUN git submodule update --init
-COPY package.json yarn.lock .yarnrc ./
-RUN yarn install
COPY . ./
-RUN yarn build
+
+RUN apk add --no-cache $BUILD_DEPS && \
+ git submodule update --init && \
+ yarn install && \
+ yarn build && \
+ rm -rf .git
FROM base AS runner
@@ -39,3 +29,4 @@ COPY --from=builder /misskey/built ./built
COPY . ./
CMD ["npm", "run", "migrateandstart"]
+