Browse Source

Update dockerfile

staging
David Ludwig 4 years ago
parent
commit
db076a730b
1 changed files with 18 additions and 2 deletions
  1. +18
    -2
      services/torrent-client/Dockerfile

+ 18
- 2
services/torrent-client/Dockerfile View File

@ -1,5 +1,7 @@
# Alpine results in segfaults, will stick with slim for now...
FROM node:14-slim AS base
WORKDIR /app
RUN apt-get update
RUN apt-get full-upgrade -y
RUN apt-get install -y libasound2 iputils-ping curl gnupg1 apt-transport-https dirmngr
@ -13,5 +15,19 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 &&
RUN apt-get autoremove --purge -y
RUN rm -rf /var/lib/apt/lists/*
# RUN mkdir /cores
WORKDIR /app
# An image containing necessary components for building
FROM base AS builder
COPY package.json yarn.lock tsconfig.json ./
RUN rm -rf node_modules && yarn install --frozen-lockfile
COPY src src
# An image to build the app
FROM builder AS build
RUN yarn run build
# An image containing the built app and production dependencies
FROM base AS prod
COPY --from=build /app/build ./build
COPY package.json yarn.lock ./
RUN rm -rf node_modules && yarn install --production --frozen-lockfile
CMD [ "yarn", "run", "start" ]

Loading…
Cancel
Save