6

I am building a docker image with the following dockerfile and then pushing it to an AWS ECR repository:

FROM openjdk:8-jdk
RUN  ["mkdir", "/opt/mycompany"]
COPY ["myapp.war/", "/opt/mycompany/myapp.war/"]
WORKDIR /opt/mycompany
CMD  ["java", "-classpath", "myapp.war/WEB-INF/classes:myapp.war/WEB-INF/lib/*", "com.mycompany.myapp.Startup"]
EXPOSE 8080

As you can see, my Docker container includes the openjdk:8-jdk Docker container (pulled from Docker Hub) plus my WAR archive.

This Docker container is intended as a means of distributing a commercial product.

Am I allowed to do that? I'm concerned over the openjdk:8-jdk Docker container which includes a Debian GNU/Linux 9 image which uses a GPL license.

2

Am I allowed to do that? I'm concerned over the openjdk:8-jdk Docker container which includes a Debian GNU/Linux 9 image which uses a GPL license.

Yes you are allowed to do that alright. Assuming you are redistributing the Docker image(s) you are also responsible to comply with the licensing conditions of every FOSS package included in the images (including attribution and corresponding source code redistribution for copyleft-licensed code).

In most cases, your own proprietary Java code that runs on top of the OpenJDK would not be subject to source code redistribution though, pretty much the same if you were to install it in a Linux plain userland (and not as part of a container image). The OpenJDK uses the GPL with various exceptions allowing to run proprietary code on top of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.