mirror of
https://github.com/maciejpedzich/playlist-entry-validator.git
synced 2024-11-27 16:05:48 +01:00
Optimise Dokcerfile to only ship transpiled JS
This commit is contained in:
parent
65393d8c2f
commit
979d77cca5
@ -1,7 +1,11 @@
|
|||||||
FROM node:lts-alpine
|
FROM node:lts-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm i
|
RUN npm i
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
CMD ["node", "./dist/index.js"]
|
|
||||||
|
FROM node:lts-alpine AS runtime
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/dist /app
|
||||||
|
CMD ["node", "./index.js"]
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
Loading…
Reference in New Issue
Block a user