-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 780 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
FROM node:6.10-slim
LABEL maintainer "M. Adam Kendall <linuxbozo@gmail.com>"
RUN apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg && \
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update
WORKDIR /usr/src/app
COPY engine.json package.json yarn.lock ./
RUN apt-get install -y git jq yarn && \
yarn install && \
version="v$(npm -j ls eclint | jq -r .dependencies.eclint.version)" && \
cat engine.json | jq ".version = \"$version\"" > /engine.json && \
apt-get purge -y git jq yarn && \
apt-get autoremove --yes
RUN adduser --uid 9000 --gecos "" --disabled-password app
COPY . ./
RUN chown -R app:app ./
USER app
VOLUME /code
WORKDIR /code
CMD ["/usr/src/app/bin/eclint"]