diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/ant/Dockerfile | 4 | ||||
-rw-r--r-- | docker/ant/files/jdk-10/build.xml | 35 | ||||
-rw-r--r-- | docker/ant/readme.md | 8 | ||||
-rw-r--r-- | docker/bazel/Dockerfile | 32 | ||||
-rw-r--r-- | docker/bazel/files/BUILD | 18 | ||||
-rw-r--r-- | docker/bazel/files/BUILD.lombok | 5 | ||||
-rw-r--r-- | docker/bazel/files/WORKSPACE | 5 | ||||
-rw-r--r-- | docker/bazel/readme.md | 33 | ||||
-rw-r--r-- | docker/gradle/Dockerfile | 6 | ||||
-rw-r--r-- | docker/gradle/readme.md | 13 | ||||
-rw-r--r-- | docker/maven/Dockerfile | 4 | ||||
-rw-r--r-- | docker/maven/files/jdk-10/pom.xml | 53 | ||||
-rw-r--r-- | docker/maven/readme.md | 8 | ||||
-rw-r--r-- | docker/provision/bazel/bazel-0.13.0.sh | 4 | ||||
-rw-r--r-- | docker/provision/gradle/gradle-4.7.sh | 4 | ||||
-rwxr-xr-x | docker/provision/jdk/java-10.sh | 4 | ||||
-rwxr-xr-x | docker/provision/jdk/java-9.sh | 2 | ||||
-rw-r--r-- | docker/readme.md | 5 |
18 files changed, 217 insertions, 26 deletions
diff --git a/docker/ant/Dockerfile b/docker/ant/Dockerfile index 32457709..b4789a2e 100644 --- a/docker/ant/Dockerfile +++ b/docker/ant/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:16.04 as downloader -ARG jdk=9 +ARG jdk=10 ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh RUN provision/jdk/java-${jdk}.sh @@ -19,7 +19,7 @@ WORKDIR workspace ADD shared/ ./ -ARG jdk=9 +ARG jdk=10 ADD ant/files/jdk-${jdk} ./ ARG lombokjar=lombok.jar diff --git a/docker/ant/files/jdk-10/build.xml b/docker/ant/files/jdk-10/build.xml new file mode 100644 index 00000000..3f181ed9 --- /dev/null +++ b/docker/ant/files/jdk-10/build.xml @@ -0,0 +1,35 @@ +<project name="example" default="dist" basedir="."> + <property name="src" location="src/main/java"/> + <property name="build" location="build"/> + <property name="dist" location="dist"/> + <property name="build.sysclasspath" value="ignore"/> + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + </target> + + <target name="compile" depends="init" description="compile the source"> + <javac classpath="lombok.jar" srcdir="${src}" destdir="${build}" fork="true"> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> + <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> + </javac> + </target> + + <target name="dist" depends="compile" description="generate the distribution"> + <mkdir dir="${dist}/lib"/> + <jar jarfile="${dist}/lib/example-${DSTAMP}.jar" basedir="${build}"/> + </target> + + <target name="clean" description="clean up"> + <delete dir="${build}"/> + <delete dir="${dist}"/> + </target> +</project>
\ No newline at end of file diff --git a/docker/ant/readme.md b/docker/ant/readme.md index d6462523..6618cd03 100644 --- a/docker/ant/readme.md +++ b/docker/ant/readme.md @@ -13,17 +13,17 @@ The ant version to be used. Supported values: (To be executed from the `<lombokhome>/docker` directory) ``` -docker build -t lombok-ant-jdk9 -f gradle/Dockerfile . +docker build -t lombok-ant-jdk10 -f ant/Dockerfile . -docker build -t lombok-ant-jdk9 --build-arg lombokjar=lombok-1.16.18.jar -f gradle/Dockerfile . +docker build -t lombok-ant-jdk10 --build-arg lombokjar=lombok-1.16.20.jar -f ant/Dockerfile . ``` ## Example run commands: ``` -docker run -it lombok-ant-jdk9 +docker run -it lombok-ant-jdk10 -docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-ant-jdk9 +docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-ant-jdk10 ``` ## Example container commands: 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 diff --git a/docker/bazel/files/BUILD b/docker/bazel/files/BUILD new file mode 100644 index 00000000..4a9c7655 --- /dev/null +++ b/docker/bazel/files/BUILD @@ -0,0 +1,18 @@ +java_binary( + name = "ProjectRunner", + main_class = "HelloWorld", + srcs = glob(["src/main/java/*.java"]), + deps = [":lombok"], +) + +java_plugin( + name = "lombok_plugin", + processor_class = "lombok.launch.AnnotationProcessorHider$AnnotationProcessor", + deps = ["@lombok_jar//:jar"], +) + +java_library( + name = "lombok", + exports = ["@lombok_jar//:jar"], + exported_plugins = [":lombok_plugin"], +)
\ No newline at end of file diff --git a/docker/bazel/files/BUILD.lombok b/docker/bazel/files/BUILD.lombok new file mode 100644 index 00000000..06836d17 --- /dev/null +++ b/docker/bazel/files/BUILD.lombok @@ -0,0 +1,5 @@ +java_import( + name = "jar", + jars = ["lombok.jar"], + visibility = ["//visibility:public"] +) diff --git a/docker/bazel/files/WORKSPACE b/docker/bazel/files/WORKSPACE new file mode 100644 index 00000000..4b073ec8 --- /dev/null +++ b/docker/bazel/files/WORKSPACE @@ -0,0 +1,5 @@ +new_local_repository( + name = "lombok_jar", + path = "/workspace", + build_file = "BUILD.lombok", +)
\ No newline at end of file diff --git a/docker/bazel/readme.md b/docker/bazel/readme.md new file mode 100644 index 00000000..2bed86f1 --- /dev/null +++ b/docker/bazel/readme.md @@ -0,0 +1,33 @@ +## Configuration + +[_(general configuration and options)_](../readme.md) + +### `ARG bazel=0.13.0` + +The bazel version to be used. Supported values: + +- `0.13.0` (default) + +## Example build commands: + +(To be executed from the `<lombokhome>/docker` directory) + +``` +docker build -t lombok-bazel-jdk10 -f bazel/Dockerfile . + +docker build -t lombok-bazel-jdk10 --build-arg lombokjar=lombok-1.16.20.jar -f bazel/Dockerfile . +``` + +## Example run commands: + +``` +docker run -it lombok-bazel-jdk10 + +docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-bazel-jdk10 +``` + +## Example container commands: + +``` +bazel build //:ProjectRunner +``` diff --git a/docker/gradle/Dockerfile b/docker/gradle/Dockerfile index 938d417e..204fe00f 100644 --- a/docker/gradle/Dockerfile +++ b/docker/gradle/Dockerfile @@ -1,10 +1,10 @@ FROM ubuntu:16.04 as downloader
-ARG jdk=9
+ARG jdk=10
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh
RUN provision/jdk/java-${jdk}.sh
-ARG gradle=4.2.1
+ARG gradle=4.7
ADD provision/gradle/gradle-${gradle}.sh provision/gradle/gradle-${gradle}.sh
RUN provision/gradle/gradle-${gradle}.sh
@@ -22,7 +22,7 @@ ADD gradle/files/ ./ ARG lombokjar=lombok.jar
ADD https://projectlombok.org/downloads/${lombokjar} lombok.jar
-ARG jdk=9
+ARG jdk=10
ENV JDK_VERSION=${jdk}
ENV JAVA_HOME=/opt/jdk
ENV GRADLE_HOME=/opt/gradle/gradle
diff --git a/docker/gradle/readme.md b/docker/gradle/readme.md index efe4f237..486b430b 100644 --- a/docker/gradle/readme.md +++ b/docker/gradle/readme.md @@ -2,28 +2,29 @@ [_(general configuration and options)_](../readme.md) -### `ARG gradle=4.2.1` +### `ARG gradle=4.7` The gradle version to be used. Supported values: -- `4.2.1` (default) +- `4.7` (default) +- `4.2.1` ## Example build commands: (To be executed from the `<lombokhome>/docker` directory) ``` -docker build -t lombok-gradle-jdk9 -f gradle/Dockerfile . +docker build -t lombok-gradle-jdk10 -f gradle/Dockerfile . -docker build -t lombok-gradle-jdk9 --build-arg lombokjar=lombok-1.16.18.jar -f gradle/Dockerfile . +docker build -t lombok-gradle-jdk10 --build-arg lombokjar=lombok-1.16.20.jar -f gradle/Dockerfile . ``` ## Example run commands: ``` -docker run -it lombok-gradle-jdk9 +docker run -it lombok-gradle-jdk10 -docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-gradle-jdk9 +docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-gradle-jdk10 ``` ## Example container commands: diff --git a/docker/maven/Dockerfile b/docker/maven/Dockerfile index 83f124f1..a73faaf6 100644 --- a/docker/maven/Dockerfile +++ b/docker/maven/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:16.04 as downloader
-ARG jdk=9
+ARG jdk=10
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh
RUN provision/jdk/java-${jdk}.sh
@@ -19,7 +19,7 @@ WORKDIR workspace ADD shared/ ./
-ARG jdk=9
+ARG jdk=10
ADD maven/files/jdk-${jdk} ./
ARG lombokjar=lombok.jar
diff --git a/docker/maven/files/jdk-10/pom.xml b/docker/maven/files/jdk-10/pom.xml new file mode 100644 index 00000000..9940955d --- /dev/null +++ b/docker/maven/files/jdk-10/pom.xml @@ -0,0 +1,53 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.example</groupId> + <artifactId>lombok-jdk-${env.JDK_VERSION}</artifactId> + <version>1.0-SNAPSHOT</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <java.version>1.10</java.version> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>${java.version}</source> + <target>${java.version}</target> + <showDeprecation>true</showDeprecation> + <showWarnings>true</showWarnings> + <fork>true</fork> + <compilerargs> + <arg>-Werror</arg> + <arg>-Xlint:all</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg> + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg> + </compilerargs> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>1.2.3</version> + <scope>system</scope> + <systemPath>/workspace/lombok.jar</systemPath> + </dependency> + </dependencies> + +</project>
\ No newline at end of file diff --git a/docker/maven/readme.md b/docker/maven/readme.md index 20cf126f..15887fa5 100644 --- a/docker/maven/readme.md +++ b/docker/maven/readme.md @@ -13,17 +13,17 @@ The maven version to be used. Supported values: (To be executed from the `<lombokhome>/docker` directory) ``` -docker build -t lombok-maven-jdk9 -f maven/Dockerfile . +docker build -t lombok-maven-jdk10 -f maven/Dockerfile . -docker build -t lombok-maven-jdk9 --build-arg lombokjar=lombok-1.16.18.jar -f maven/Dockerfile . +docker build -t lombok-maven-jdk10 --build-arg lombokjar=lombok-1.16.20.jar -f maven/Dockerfile . ``` ## Example run commands: ``` -docker run -it lombok-maven-jdk9 +docker run -it lombok-maven-jdk10 -docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-maven-jdk9 +docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-maven-jdk10 ``` ## Example container commands: diff --git a/docker/provision/bazel/bazel-0.13.0.sh b/docker/provision/bazel/bazel-0.13.0.sh new file mode 100644 index 00000000..24b50d9a --- /dev/null +++ b/docker/provision/bazel/bazel-0.13.0.sh @@ -0,0 +1,4 @@ +apt-get update && apt-get install -y wget pkg-config zip g++ zlib1g-dev unzip python +wget https://github.com/bazelbuild/bazel/releases/download/0.13.0/bazel-0.13.0-installer-linux-x86_64.sh -O bazel-installer.sh +chmod +x bazel-installer.sh +./bazel-installer.sh --prefix=/opt/bazel
\ No newline at end of file diff --git a/docker/provision/gradle/gradle-4.7.sh b/docker/provision/gradle/gradle-4.7.sh new file mode 100644 index 00000000..a2e3ebec --- /dev/null +++ b/docker/provision/gradle/gradle-4.7.sh @@ -0,0 +1,4 @@ +apt-get update && apt-get install -y wget unzip +wget https://services.gradle.org/distributions/gradle-4.7-bin.zip -O gradle.zip +mkdir /opt/gradle && unzip -d /opt/gradle gradle.zip +mv /opt/gradle/gradle-4.7 /opt/gradle/gradle diff --git a/docker/provision/jdk/java-10.sh b/docker/provision/jdk/java-10.sh index 9b5f3176..10790952 100755 --- a/docker/provision/jdk/java-10.sh +++ b/docker/provision/jdk/java-10.sh @@ -1,4 +1,4 @@ apt-get update && apt-get install -y wget -wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/10+46/76eac37278c24557a3c4199677f19b62/jdk-10_linux-x64_bin.tar.gz -O jdk.tar.gz +wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz -O jdk.tar.gz tar -xzf jdk.tar.gz -C /opt/ -mv /opt/jdk-10 /opt/jdk +mv /opt/jdk-10.0.1 /opt/jdk diff --git a/docker/provision/jdk/java-9.sh b/docker/provision/jdk/java-9.sh index fd488dc8..483c1a28 100755 --- a/docker/provision/jdk/java-9.sh +++ b/docker/provision/jdk/java-9.sh @@ -1,4 +1,4 @@ apt-get update && apt-get install -y wget -wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz -O jdk.tar.gz +wget https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz -O jdk.tar.gz tar -xzf jdk.tar.gz -C /opt/ mv /opt/jdk-9.0.4 /opt/jdk diff --git a/docker/readme.md b/docker/readme.md index f6b6e550..9939839d 100644 --- a/docker/readme.md +++ b/docker/readme.md @@ -10,11 +10,12 @@ Each docker image contains a `/workspace` where all relevant files are located. When building the image, a lombok.jar will be downloaded to `/workspace`. By default, this is the latest released version. You
can download a specific version by adding `--build-arg lombokjar=lombok-<major.minor.build>.jar`
-### `ARG jdk=9`
+### `ARG jdk=10`
The jdk version to be used. Supported values:
-- `9` (default)
+- `10` (default)
+- `9` (OpenJDK)
- `8`
The version is also accessible in `JDK_VERSION`.
|