Skip to content

Commit 0eb3890

Browse files
author
ABaldwinHunter
committed
Update dockerfile to copy package.json before running npm install
We recently packaged codeclimate-fixme as a node module and so updated the Dockerfile to run simply `npm install`, grabbing the requisite dependencies from the package.json. However, we need to make sure that the package.json gets copied over first. This change fixes the Dockerfile and makes it look more like the flow in some of our other engines. E.g.: codeclimate-rubocop https://github.com/codeclimate/codeclimate-rubocop/blob/master/Dockerfile
1 parent d761d0a commit 0eb3890

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ FROM node
22

33
MAINTAINER Michael R. Bernstein
44

5-
RUN useradd -u 9000 -r -s /bin/false app
5+
WORKDIR /usr/src/app/
6+
7+
COPY engine.json /
8+
COPY package.json /usr/src/app/
69

710
ENV NODE_ENV production
811

912
RUN npm install
1013

11-
WORKDIR /code
12-
COPY . /usr/src/app
13-
COPY engine.json /
14-
14+
RUN useradd -u 9000 -r -s /bin/false app
1515
USER app
16-
VOLUME /code
16+
17+
COPY . /usr/src/app
1718

1819
CMD ["/usr/src/app/bin/fixme"]

0 commit comments

Comments
 (0)