Update Dockerfile for way faster build
This commit is contained in:
parent
c777a7bce2
commit
63af2fbf9c
1 changed files with 8 additions and 4 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -1,12 +1,16 @@
|
||||||
FROM node:lts-alpine
|
FROM node:lts-alpine
|
||||||
|
|
||||||
# add project files to /app
|
|
||||||
ADD ./ /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy only package files and install deps
|
||||||
|
# This layer will be cached as long as package*.json don't change
|
||||||
|
COPY package*.json package-lock.json* ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
# Copy the rest of your source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN apk add --no-cache openssl
|
RUN apk add --no-cache openssl
|
||||||
|
|
||||||
# install node dependencies
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue