Skip to content

Add Dockerfile #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM openjdk:alpine

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

RUN apk update && apk upgrade

RUN addgroup -g 9000 -S code && \
adduser -S -G code app
USER app

COPY codeclimate-scalastyle-assembly-0.1.0.jar /usr/src/app/engine-core.jar
COPY src/main/resources/docker /usr/src/app

WORKDIR /code
VOLUME /code

CMD ["/usr/src/app/bin/scalastyle"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
1. Install [sbt](http://www.scala-sbt.org/)
2. Run `sbt docker`


### Building release docker image
1. Run `sbt assembly && cp target/scala-2.12/codeclimate-scalastyle-assembly-<version>.jar ./`.
This will create assembled jar with all dependencies.
2. Run `docker build -t codeclimate/codeclimate-scalastyle .`

### Installation

1. If you haven't already, [install the Code Climate CLI](https://github.com/codeclimate/codeclimate).
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ imageNames in docker := Seq(
ImageName(
namespace = Some("codeclimate"),
repository = name.value,
tag = Some("v" + version.value)
tag = Some(version.value)
)
)

Expand Down
Binary file added codeclimate-scalastyle-assembly-0.1.0.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/resources/docker/engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "scalastyle",
"description": "Run scalastyle checks",
"maintainer": {
"name": "Ivan Luzyanin",
"email": "ivan@acorns.com"
"name": "Jeff Sippel",
"email": "jsippel@acorns.com"
},
"languages" : ["Scala"],
"version": "v0.1.0",
"version": "0.1.0",
"spec_version": "0.0.1"
}