William Gosse 4 Years Ago This is great but it seems to be intimately tied to the Liferay IDE. Is that true? Could any of these be used in a separate build pipeline running out of something like Azure GIT? Please sign in to reply. Reply as... Cancel David H Nebinger William Gosse 4 Years Ago I avoid focusing on an ide, I use intellij but I know others use the Liferay IDE. This blog doesn't use the ide, just the Liferay gradle workspace, so it is all command line. The ides can make it easier to invoke, but you could do this from any command line or even Jenkins. Please sign in to reply. Reply as... Cancel
David H Nebinger William Gosse 4 Years Ago I avoid focusing on an ide, I use intellij but I know others use the Liferay IDE. This blog doesn't use the ide, just the Liferay gradle workspace, so it is all command line. The ides can make it easier to invoke, but you could do this from any command line or even Jenkins. Please sign in to reply. Reply as... Cancel
Antonio Musarra 4 Years Ago - Edited Hi David, you wrote a nice and useful article. I was inspired by this work of yours to write this on my blog: How to build a Docker Liferay 7.2 image with the Oracle Database support https://www.dontesta.it/en/2019/08/21/how-to-build-a-docker-liferay-7-2-image-with-the-oracle-database-support/ Please sign in to reply. Reply as... Cancel David H Nebinger Antonio Musarra 4 Years Ago Great post, Antonio! I added a link to the blog so folks could find it! Please sign in to reply. Reply as... Cancel Antonio Musarra David H Nebinger 4 Years Ago Thanks for sharing the link and for appreciating the post. Please sign in to reply. Reply as... Cancel
David H Nebinger Antonio Musarra 4 Years Ago Great post, Antonio! I added a link to the blog so folks could find it! Please sign in to reply. Reply as... Cancel Antonio Musarra David H Nebinger 4 Years Ago Thanks for sharing the link and for appreciating the post. Please sign in to reply. Reply as... Cancel
Antonio Musarra David H Nebinger 4 Years Ago Thanks for sharing the link and for appreciating the post. Please sign in to reply. Reply as... Cancel
Wouter Vernaillen 4 Years Ago Do you know why the Liferay docker images are still using jdk8? We have a requirement to use openjdk-11, so I started from Liferay's 7.2.0-ga1 image, added the zulu jdk11 to it and removed jdk8. I'm not sure though if this is a good approach, or if it would be better to completely build the image from scratch. This is my Dockerfile: FROM liferay/portal:7.2.0-ga1 USER root ENV JAVA_HOME=/usr/lib/jvm/zulu-11 RUN ZULU_ARCH=zulu11.33.15-ca-jdk11.0.4-linux_musl_x64.tar.gz && \ INSTALL_DIR=$( dirname $JAVA_HOME ) && \ BIN_DIR=/usr/bin && \ MAN_DIR=/usr/share/man/man1 && \ ZULU_DIR=$( basename ${ZULU_ARCH} .tar.gz ) && \ cd ~ && wget -q https://cdn.azul.com/zulu/bin/${ZULU_ARCH} && \ mkdir -p ${INSTALL_DIR} && \ tar -xf ./${ZULU_ARCH} -C ${INSTALL_DIR} && rm -f ${ZULU_ARCH} && \ mv ${INSTALL_DIR}/${ZULU_DIR} ${JAVA_HOME} && \ cd ${BIN_DIR} && find ${JAVA_HOME}/bin -type f -perm -a=x -exec ln -sfn {} . \; && \ rm /usr/lib/jvm/default-jvm && rm -rf /usr/lib/jvm/java-1.8-openjdk && rm -rf /usr/lib/jvm/zulu-8 && \ mkdir -p ${MAN_DIR} && \ cd ${MAN_DIR} && find ${JAVA_HOME}/man/man1 -type f -name "*.1" -exec ln -s {} . \; USER liferay:liferay COPY --chown=liferay:liferay ./files/ /etc/liferay/mount/files/ Please sign in to reply. Reply as... Cancel David H Nebinger Wouter Vernaillen 4 Years Ago - Edited Although Liferay is certified for Java 11, it doesn't need Java 11 to run. I think you can go either way, especially if the current Dockerfile is working for you. The Liferay image is itself as light as it can be, but I don't think it would be difficult to use their Dockerfile to create your own baseline using Zulu 11. The downside is that you have to do the work yourself to swap out OpenJDK 8 for Zulu 11, but your current Dockerfile just works towards layering Zulu 11 on top. I'd say it's your call; if you're happy with what you have and it isn't broke, I can't see a pressing need to fix it. A docker purist might argue that your image is going to contain unused OpenJDK 8 cruft in it, but it might be worth it to carry the baggage rather than go your own path. Please sign in to reply. Reply as... Cancel
David H Nebinger Wouter Vernaillen 4 Years Ago - Edited Although Liferay is certified for Java 11, it doesn't need Java 11 to run. I think you can go either way, especially if the current Dockerfile is working for you. The Liferay image is itself as light as it can be, but I don't think it would be difficult to use their Dockerfile to create your own baseline using Zulu 11. The downside is that you have to do the work yourself to swap out OpenJDK 8 for Zulu 11, but your current Dockerfile just works towards layering Zulu 11 on top. I'd say it's your call; if you're happy with what you have and it isn't broke, I can't see a pressing need to fix it. A docker purist might argue that your image is going to contain unused OpenJDK 8 cruft in it, but it might be worth it to carry the baggage rather than go your own path. Please sign in to reply. Reply as... Cancel
Vernon Singleton 4 Years Ago - Edited "you have to be using the Gradle version of the Liferay Workspace" ... Just curious, what is your favorite way to create a "Gradle version of the Liferay Workspace"? Please sign in to reply. Reply as... Cancel David H Nebinger Vernon Singleton 4 Years Ago - Edited The Blade CLI is the easiest way to do that: https://help.liferay.com/hc/en-us/articles/360018164591-Blade-CLI- Please sign in to reply. Reply as... Cancel
David H Nebinger Vernon Singleton 4 Years Ago - Edited The Blade CLI is the easiest way to do that: https://help.liferay.com/hc/en-us/articles/360018164591-Blade-CLI- Please sign in to reply. Reply as... Cancel
Eliezer Ramos 2 Years Ago - Edited Hi David, thanks for the great article! I had one question regarding custom bundle docker images. You mentioned the following: "While this pattern certainly works, I don't like the fact that the ENTRYPOINT script is going to be redeploying files and modules every time my container starts up. I think that, if I have a warmed bundle w/ all deployments completed, it will represent a more consistent image that should start a container faster because it would eliminate the deployment processing." My question is - How do you warm up a bundle such that it is ready to go upon startup? My initial thought is starting the bundle in a controlled environment, letting it deploy the modules from deploy/ into osgi/ and have that as the final bundle. Am I missing something else? Thanks! Please sign in to reply. Reply as... Cancel