Skip to content

Commit

Permalink
feat: use alpine linux for smaller image size
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Sthamer <sthamer.pascal@gmail.com>
  • Loading branch information
P4sca1 committed Apr 6, 2021
1 parent 3c8b013 commit af8d001
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Base (Debian stretch)
FROM node:14 as base
# Base
FROM node:14-alpine as base

# Builder
FROM base as builder

# Install yarn.
RUN apt-get update && \
apt-get install -y curl gnupg apt-transport-https ca-certificates && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y yarn
RUN apk add --update --no-cache yarn

WORKDIR /home/node

Expand Down Expand Up @@ -42,5 +37,4 @@ COPY --from=builder --chown=node:node /home/node/dist/ ./dist/

WORKDIR /home/node


CMD ["yarn", "start"]

0 comments on commit af8d001

Please sign in to comment.