Java, Containers, and IntelliJ IDEA

preview_player
Показать описание
They told you that using Java with containers were great, but they never mentioned that wouldn't be that easy, right? You really got all advantages of containers like isolation, scalability, ease of deployment, and version management, but what about the pitfalls when using it with Java? Memory management, image size, initialization time… sometimes they can be tricky!

But there's a way out! Luckily there are have some best practices that will rescue your application from failing. From the Dockerfile to the Java updates (from 9 to 14 and beyond), you can have the best of both worlds right on your hands.
Join this practical session and transform the way you deal with Java and containers. Today.

Speaker details:
Elder Moraes, Java Champion, RedHat

Elder helps Java developers to work on great projects by guiding them on how to build and deliver secure, available, and fast server-side applications. He is a Java Champion, the author of the “Jakarta EE Cookbook“, and a board member at SouJava, one of the biggest JUGs in the world. As a Developer Advocate, Elder shares experiences and best practices through online content and at international events like JavaOne, The Developers Conference, QCon, Oracle Code One, Campus Party, and Devnexus.

Category: #Java, #Docker, #Container, #IntelliJ

Join us:

#intelliJIDEA #jetbrains #programming
Рекомендации по теме
Комментарии
Автор

Key take aways :

1. Mind order of cache.
Each line of docker file creates a layer.
docker engine will be cache that layer
for 2nd time if u r building that img again. docker engine will NOT build the layer if that layer is not changed instead it will use the cache but if layer on top has changed all docker will build all the layer under the bottom. (irrseptive of they be cached or changed/ non-changed)
Hence order matters [Put non-changing commands on top and put changing commands bottom] this saves ur build time.

2. Be Specific rather than using form regular expression. (linked to above point)
eq : copy *-jar /lib
instead : copy xyz.jar /lib

3. try to group commands b/c one cache is created for group of commands
eg : run apt-get update && apt-get -y install (1 cache for grouping 2 commands)

4. How to avoid huge jar images. (Java is know for having huge image size)

5. Maintaining:
use official images : eg: openjdk
add tag : eg: openjdk:8 (if not specified that jdk 16 will be downloaded that ur app will fail to run)
use alpine/slim/ jre in case u don't need all of openjdk eg: From openjdk:8-jre-alpine [b/c of size of image]

6. Resource allocation:
how avoid OOM - use higher version of java b/c java 8 was not designed to fit contatiners (minor cases)

manikantamaddipati
Автор

Interesting video! But I do not see any link to IntelliJ. Would be the same in the console, tho. Maybe not even related to Java. The title seems to be wrong. More like"how to use the cache of Docker"?

bboySilver
Автор

have notice intellij is rather not stable and often crash with each iteration. as developers we are hoping for more stable platform

watb