forked from d2iq-archive/marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.development
42 lines (34 loc) · 1.78 KB
/
Dockerfile.development
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# This is the docker image used for ./bin/run-tests.sh and development tasks.
#
# It will NOT reresolve all dependencies on every change (as opposed to Dockerfile)
# but it ultimately results in a larger docker image.
#
FROM java:8-jdk
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF && \
echo "deb http://repos.mesosphere.com/debian jessie-testing main" | tee /etc/apt/sources.list.d/mesosphere.list && \
echo "deb http://repos.mesosphere.com/debian jessie main" | tee -a /etc/apt/sources.list.d/mesosphere.list && \
apt-get update && \
apt-get install --no-install-recommends -y --force-yes mesos=0.28.0-1.0.19.rc1.debian81 lxc
# Install sbt manually
COPY ./project/build.properties /marathon/project/build.properties
RUN eval $(sed s/sbt.version/SBT_VERSION/ </marathon/project/build.properties) && \
mkdir -p /usr/local/bin && \
wget -P /usr/local/bin/ https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/$SBT_VERSION/sbt-launch.jar
COPY project/sbt /usr/local/bin/
RUN chmod +x /usr/local/bin/sbt
ARG DOCKER_VERSION=latest
RUN curl -o /usr/bin/docker https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION} && chmod +x /usr/bin/docker
WORKDIR /marathon
# The build configuration including dependencies changes
# less frequently than the source code. By separating
# these steps we can greatly speed up cached local docker builds.
COPY project /marathon/project
# even without sources this will resolve all dependencies and compile the scala compiler interfaces
RUN sbt compile
COPY . /marathon
RUN sbt -Dsbt.log.format=false assembly && \
mv $(find target -name 'marathon-assembly-*.jar' | sort | tail -1) ./ && \
rm -rf target/* && \
mv marathon-assembly-*.jar target
ENTRYPOINT ["./bin/start"]