aboutsummaryrefslogtreecommitdiff
path: root/docker/bazel/Dockerfile
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2018-05-01 01:45:08 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-05-01 01:45:08 +0200
commit7d581273601cba888e0bb4ec53de5af05eb72c93 (patch)
treef931a03cfe9ea503f23141d329850fca9429745d /docker/bazel/Dockerfile
parent87ad2f6f5973c355131927d7c4250236c04f7eab (diff)
downloadlombok-7d581273601cba888e0bb4ec53de5af05eb72c93.tar.gz
lombok-7d581273601cba888e0bb4ec53de5af05eb72c93.tar.bz2
lombok-7d581273601cba888e0bb4ec53de5af05eb72c93.zip
docker: add bazel
Diffstat (limited to 'docker/bazel/Dockerfile')
-rw-r--r--docker/bazel/Dockerfile32
1 files changed, 32 insertions, 0 deletions
diff --git a/docker/bazel/Dockerfile b/docker/bazel/Dockerfile
new file mode 100644
index 00000000..bbfc4e89
--- /dev/null
+++ b/docker/bazel/Dockerfile
@@ -0,0 +1,32 @@
+FROM ubuntu:16.04 as downloader
+
+ARG jdk=10
+ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh
+RUN provision/jdk/java-${jdk}.sh
+
+ARG bazel=0.13.0
+ADD provision/bazel/bazel-${bazel}.sh provision/bazel/bazel-${bazel}.sh
+RUN provision/bazel/bazel-${bazel}.sh
+
+FROM ubuntu:16.04
+
+COPY --from=downloader /opt/bazel/ /opt/bazel/
+COPY --from=downloader /opt/jdk/ /opt/jdk/
+
+RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000
+RUN apt-get update && apt-get install -y g++
+
+WORKDIR workspace
+
+ADD shared/ ./
+ADD bazel/files/ ./
+ARG lombokjar=lombok.jar
+ADD https://projectlombok.org/downloads/${lombokjar} lombok.jar
+
+ARG jdk=10
+ENV JDK_VERSION=${jdk}
+ENV JAVA_HOME=/opt/jdk
+ENV BAZEL_HOME=/opt/bazel
+ENV PATH="${JAVA_HOME}/bin:${BAZEL_HOME}/bin:${PATH}"
+
+ENTRYPOINT bash