Skip to content

Commit 3dbb299

Browse files
committed
Various cleanup
Chang base image to openjdk:alpine Update ScalaStyle from 0.6.0 -> 1.0.0
1 parent aa8e486 commit 3dbb299

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

Dockerfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
FROM java
1+
FROM openjdk:alpine
22

33
LABEL maintainer "Jeff Sippel <[email protected]>"
44

5-
RUN apt-get update
6-
RUN apt-get install -y ruby ruby-nokogiri
5+
RUN apk update && \
6+
apk upgrade && \
7+
apk add --no-cache ruby ruby-nokogiri ruby-json
78

8-
RUN adduser -u 9000 --disabled-password --quiet --gecos "" app
9+
RUN addgroup -g 9000 -S code && \
10+
adduser -S -G code app
911
USER app
1012

11-
WORKDIR /usr/src/app
12-
13-
COPY scalastyle_config.xml /usr/src/app/
14-
COPY scalastyle_2.11-0.6.0-batch.jar /usr/src/app/
15-
1613
COPY . /usr/src/app
1714

18-
VOLUME /code
1915
WORKDIR /code
16+
VOLUME /code
2017

2118
CMD ["/usr/src/app/bin/scalastyle"]

lib/cc/engine/scalastyle.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def initialize(directory: , io: , engine_config: )
1212

1313
def run
1414
exec_scalastyle_with_options
15-
15+
1616
Dir.chdir(@directory) do
1717
next unless results
1818
results.xpath('//file').each do |file|
@@ -57,7 +57,7 @@ def analysis_files
5757
end
5858

5959
def scalastyle_jar
60-
'/usr/src/app/scalastyle_2.11-0.6.0-batch.jar'
60+
'/usr/src/app/scalastyle_2.12-1.0.0-batch.jar'
6161
end
6262

6363
def scalastyle_config
@@ -80,7 +80,7 @@ def results
8080
@results ||= Nokogiri::XML(File.read(results_xml_file_path))
8181
end
8282
end
83-
83+
8484
end
8585
end
8686
end

scalastyle_2.11-0.6.0-batch.jar

-9.12 MB
Binary file not shown.

scalastyle_2.12-1.0.0-batch.jar

7.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)