File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
1
FROM node:6.10.0-slim
2
2
LABEL maintainer "Code Climate <hello@codeclimate.com>"
3
3
4
- RUN apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg && \
5
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
6
- apt-get update
4
+ RUN adduser --uid 9000 --gecos "" --disabled-password app
7
5
8
6
WORKDIR /usr/src/app
9
- COPY bin/docs ./bin/docs
10
- COPY engine.json package.json yarn.lock ./
11
7
12
- RUN mkdir /usr/local/node_modules
13
8
ENV PREFIX=/usr/local/node_modules
14
9
ENV PATH=$PREFIX/.bin:$PATH
15
10
ENV NODE_PATH=$PREFIX
16
11
ENV NPM_CONFIG_PREFIX=$PREFIX
17
12
18
- RUN apt-get install -y git jq yarn && \
13
+ RUN mkdir $PREFIX
14
+
15
+ COPY bin/docs ./bin/docs
16
+ COPY engine.json package.json yarn.lock ./
17
+
18
+ RUN apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg && \
19
+ echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
20
+ apt-get update && \
21
+ apt-get install -y git jq yarn && \
19
22
yarn config set prefix $PREFIX && \
20
23
yarn install --modules-folder $PREFIX && \
24
+ chown -R app:app $PREFIX && \
21
25
version="v$(yarn list eslint | grep eslint | sed -n 's/.*@//p')" && \
22
26
bin/docs "$version" && \
23
27
cat engine.json | jq ".version = \" $version\" " > /engine.json && \
24
28
apt-get purge -y git jq yarn && \
25
29
apt-get autoremove --yes
26
30
27
- RUN adduser --uid 9000 --gecos "" --disabled-password app
28
31
COPY . ./
29
32
RUN chown -R app:app ./
30
- RUN chown -R app:app $PREFIX
31
33
32
34
USER app
33
35
You can’t perform that action at this time.
0 commit comments