mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
fix dockerfile, add tracker tests
This commit is contained in:
@@ -1,28 +1,24 @@
|
||||
FROM node:lts-buster-slim as builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y python3 make g++ && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN npm install -g npm@^8 && npm config set python /usr/bin/python3
|
||||
RUN apt update && apt install -y git && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY package.json ./
|
||||
COPY yarn.lock ./
|
||||
RUN yarn install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN yarn run build
|
||||
RUN yarn install --production
|
||||
|
||||
# --- Runtime Stage ---
|
||||
FROM node:lts-buster-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
COPY --from=builder /app ./
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV NODE_OPTIONS "--no-deprecation"
|
||||
|
||||
# CIS-DI-0001
|
||||
RUN useradd -d /home/consumer -m -s /bin/bash consumer
|
||||
|
||||
Reference in New Issue
Block a user