-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (42 loc) · 895 Bytes
/
Dockerfile
File metadata and controls
55 lines (42 loc) · 895 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Conventional Tools Docker Build
#
#
# Install all the dependencies in its own step for better step cacheing
#
FROM node:16 as deps
WORKDIR /build
COPY package.json /build/package.json
COPY yarn.lock /build/yarn.lock
RUN yarn install
#
# Build the conventional tools package
#
FROM node:16 as build
WORKDIR /build
COPY --from=deps /build/node_modules /build/node_modules
COPY .git /build/.git
COPY bin /build/bin
COPY package.json /build/package.json
COPY src /build/src
COPY tsconfig.json /build/tsconfig.json
COPY yarn.lock /build/yarn.lock
RUN yarn build
RUN npm pack
#
# Step for the main step
#
FROM node:16 as app
WORKDIR /app
#
# Copy up the dist package
#
COPY --from=build /build/dist .
#
# Install the conventional tools package
#
RUN npm i -g $(find . -type f -name "conventional-tools-v*.tar.gz")
#
# Remove the dist packages we copied up earlier
#
RUN rm -rf /app/*