File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM maven:3.3.9-jdk-8-alpine
2
+
3
+ MAINTAINER Code Climate
4
+
5
+ # Create user and app directory
6
+ RUN adduser -u 9000 -D app
7
+ COPY . /usr/src/app
8
+ RUN chown -R app:app /usr/src/app
9
+
10
+ # Package the app with Maven
11
+ WORKDIR /usr/src/app
12
+ RUN mvn package
13
+
14
+ # Unzip the packaged app
15
+ RUN mkdir /usr/src/app/dest
16
+ RUN unzip /usr/src/app/target/sonarlint-cli-*.zip \
17
+ -d /usr/src/app/dest
18
+ RUN cp -R /usr/src/app/dest/sonarlint-cli-*/* \
19
+ /usr/src/app/dest
20
+
21
+ # Specify the /code volume
22
+ # as needed by CC
23
+ VOLUME /code
24
+
25
+ # Create a writeable directory for the code
26
+ RUN mkdir -p /code-read-write
27
+ RUN chown -R app:app /code-read-write
28
+ RUN chmod -R 777 /code-read-write
29
+
30
+ # Switch to app user, copy code to writable
31
+ # directory, and run the engine
32
+ USER app
33
+ ENTRYPOINT []
34
+ WORKDIR /code-read-write
35
+ CMD cp -R /code/* . && \
36
+ /usr/src/app/dest/bin/sonarlint
You can’t perform that action at this time.
0 commit comments