mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-31 14:51:09 +03:00
multi-stage dockerfile with node:14-alpine
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -1,13 +1,14 @@
|
|||||||
FROM node:14
|
FROM node:14-alpine as builder
|
||||||
WORKDIR /usr/src/app
|
RUN apk add --no-cache --virtual .build-deps python make g++
|
||||||
COPY package.json .
|
COPY package.json package-lock.json tsconfig.json entrypoint.sh ./
|
||||||
COPY package-lock.json .
|
|
||||||
COPY tsconfig.json .
|
|
||||||
COPY src src
|
COPY src src
|
||||||
RUN npm ci
|
RUN npm ci && npm run tsc
|
||||||
RUN npm run tsc
|
|
||||||
RUN mkdir databases
|
FROM node:14-alpine as app
|
||||||
COPY databases/*.sql databases/
|
WORKDIR /usr/src/app
|
||||||
|
COPY --from=builder node_modules .
|
||||||
|
COPY --from=builder dist ./dist
|
||||||
COPY entrypoint.sh .
|
COPY entrypoint.sh .
|
||||||
|
COPY databases/*.sql databases/
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ./entrypoint.sh
|
CMD ./entrypoint.sh
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
echo 'Entrypoint script'
|
echo 'Entrypoint script'
|
||||||
cd /usr/src/app
|
cd /usr/src/app
|
||||||
|
|||||||
Reference in New Issue
Block a user