-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (27 loc) · 803 Bytes
/
Dockerfile
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
FROM node:lts-alpine AS BUILD_IMAGE
WORKDIR /usr/app
COPY . .
# install java to build antlr
RUN apk update && apk add openjdk8
# copy npm and package.json files to local
# https://docs.npmjs.com/docker-and-private-modules
# accept token parameter from outside
ARG NPM_TOKEN
ARG NPM_TOKEN_FONT_AWESOME
COPY .npmrc .npmrc
COPY package.json package.json
# install dependencies
RUN npm ci
# build application
#RUN npm run build
RUN npm run build-storybook -- -o ./dist
# delete custom npmrc to avoid token hijacking
RUN rm -f .npmrc
#FROM node:lts-alpine
#WORKDIR /usr/app
# copy from build image
#COPY --from=BUILD_IMAGE /usr/app/dist ./dist
#COPY --from=BUILD_IMAGE /usr/app/node_modules ./node_modules
CMD npm run storybook
#CMD ["node", "dist/index.html"]
#CMD ["npm", "run storybook"]