-
Notifications
You must be signed in to change notification settings - Fork 81
/
Dockerfile.dev
37 lines (27 loc) · 939 Bytes
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# --------------- STAGE 1: Develop ---------------
FROM ludx/dev:12 as stage-develop
# Install dev dependencies
RUN apk update
# libc6-compat linux-headers autoconf git wget curl bash make nasm build-base openssl-dev ca-certificates libssl1.1 openssl \
# && rm -rf /var/cache/apk/* \
CMD ["npm", "run", "dev"]
# --------------- STAGE 2: Build ---------------
FROM stage-develop as stage-build
# Install dependencies first so that cache layer isn't invalidated by source code change
#COPY package*.json yarn.lock ./
#COPY common ./common
RUN yarn install
#COPY . ./
#RUN npm run lint \
# && yarn start test \
# && yarn start test.integration \
# && yarn start test.e2e \
# && npm run build
# --------------- STAGE 3: Host ---------------
FROM ludx/base:12
RUN mkdir -p /usr/src/app/data/database
WORKDIR /usr/src/app
COPY --from=stage-build /app .
#USER node
#CMD ["yarn", "start", "serve"]
# EXPOSE 3000 3100 3200