Skip to content

Commit

Permalink
fix Dockerfile (#7763)
Browse files Browse the repository at this point in the history
* fix Dockerfile

* remove unnecessary change

* add misskey-assets in .dockerignore
  • Loading branch information
junkurihara authored Sep 4, 2021
1 parent bf7bacc commit 65d9c30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.autogen
.git
.github
.travis
.vscode
Expand All @@ -12,3 +11,4 @@ elasticsearch/
node_modules/
redis/
files/
misskey-assets/
27 changes: 9 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@ ENV 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

RUN apk add --no-cache \
autoconf \
automake \
file \
g++ \
gcc \
libc-dev \
libtool \
make \
nasm \
pkgconfig \
python3 \
zlib-dev

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

Expand All @@ -39,3 +29,4 @@ COPY --from=builder /misskey/built ./built
COPY . ./

CMD ["npm", "run", "migrateandstart"]

0 comments on commit 65d9c30

Please sign in to comment.