mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
084b790dfe
* Modify Dockerfile and docker-compose.yml * Fix MongoDB connection error * Use alpine-3.8 instead of alpine-edge as base image * Modify install packages * Modify Mongodb image tag name * Update Docker documents * Add 'Download misskey' paragraph * Make redis optional for Docker
38 lines
654 B
Docker
38 lines
654 B
Docker
FROM alpine:3.8 AS base
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN apk add --no-cache nodejs nodejs-npm zlib
|
|
WORKDIR /misskey
|
|
COPY . ./
|
|
|
|
FROM base AS builder
|
|
|
|
RUN apk add --no-cache \
|
|
gcc \
|
|
g++ \
|
|
libc-dev \
|
|
python \
|
|
autoconf \
|
|
automake \
|
|
file \
|
|
make \
|
|
nasm \
|
|
pkgconfig \
|
|
libtool \
|
|
zlib-dev
|
|
RUN npm install \
|
|
&& npm install -g node-gyp \
|
|
&& 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", "--"]
|
|
|
|
CMD ["npm", "start"]
|