-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 698 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 698 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
FROM mhart/alpine-node:10
LABEL maintainer = "tkqubo <tk.qubo@gmail.com>"
RUN adduser -u 9000 -D app
WORKDIR /usr/src/app
COPY engine.json package.json yarn.lock ./
COPY ./bin/ ./bin/
RUN npm install --global yarn && \
apk --update add git jq && \
yarn install && \
jq <engine.json ".version = \"$(bin/version tslint)-$(git rev-parse HEAD)\"" > /engine.json && \
bin/get-tslint-rules && \
chown -R app:app . && \
apk del --purge git jq && \
rm -rf /var/cache/apk/* /tmp/* ~/.npm && \
npm uninstall --global yarn
USER app
COPY . ./
USER root
RUN mkdir -p dist
RUN chown app:app -R dist
USER app
RUN npm run build
VOLUME /code
WORKDIR /code
CMD ["/usr/src/app/bin/analyze"]