forked from d2iq-archive/marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
45 lines (39 loc) · 1.95 KB
/
Dockerfile.build
File metadata and controls
45 lines (39 loc) · 1.95 KB
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
43
44
45
#
# Base docker image used to build inside of a CI environment.
# This should be updated and pushed with bin/update-base-build.sh
# when we change the SBT version, mesos lib, or dependencies
#
# While it is not absolutely necessary (with the exception of the
# mesos lib), it will significantly speedup the build.
#
# We install docker 1.11.0 to /usr/bin - it likely should be overridden by
# the user's docker so that the versions match
#
# CI Builds should base their build off of this image which is tagged
# carefully
FROM openjdk:8-jdk
COPY . /marathon
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF && \
echo "deb http://repos.mesosphere.com/debian jessie-unstable main" | tee /etc/apt/sources.list.d/mesosphere.list && \
echo "deb http://repos.mesosphere.com/debian jessie-testing main" | tee -a /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 && \
MESOS_VERSION=$(sed -n 's/^.*MesosDebian = "\(.*\)"/\1/p' </marathon/project/Dependencies.scala) && \
apt-get update && \
apt-get install --no-install-recommends -y --force-yes mesos=$MESOS_VERSION && \
curl -o /tmp/docker.tgz https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz && \
cd /tmp && \
tar zxf docker.tgz && \
mv docker/docker /usr/bin/docker && \
chmod +x /usr/bin/docker
RUN rm -rf /marathon/project/project/target && \
rm -rf /marathon/project/target && \
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 && \
cp /marathon/project/sbt /usr/local/bin && \
chmod +x /usr/local/bin/sbt
RUN cd /marathon && \
sbt -Dsbt.log.format=false update && \
(rm -rf /marathon || true)
WORKDIR /marathon
ENTRYPOINT ["/bin/bash"]