Docker for your Java Development Environment

preview_player
Показать описание
Learn how to setup your Java Developer Environment in a Docker Container with 2 simple commands! Re-create your developer environment consistently across all environments/platforms without having to go through all those annoying steps like remembering downlink links, environmental variable setups, custom files, network and user settings etc ..

I will explicitly cover Netbeans 8.2 & jdk8 with the
alpine linux base image in order to make for a very light base Docker Image size. Docker version 1.13.0 is being used.

You'll learn how to download and re-create your developer environment either through downloading the image straight from
Docker Hub (mvpjava public repository via "docker pull mvpjava/netbeans:8.2") or building the image yourself via the Dockerfile which we'll cover.

Learn how to run, stop and start a Docker Container from the command line as well as see how to interact with Docker straight from within the new Netbeans 8.2 IDE Services Tab (super cool).

It's important to keep your data outside the Docker Container
and you'll see how to do that with named mount point volumes.

Click on the link below to see the video "Docker for your Java Development Environment" ...

An updated Docker image running IntelliJ is now available.
+++++++++++++++++++++++++++++++++++++++++++++++++++++

The tutuorial uses Ubuntu 16.04 Xenial as the Linux Host running Docker
==================================================
I used the following commands to setup Docker ...
==================================================
1. apt-get update
3. apt-get update
5. apt-get update
6. apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
7. apt-get install docker-engine
8. usermod -aG docker $USER
9. service docker start
10. docker run hello-world

If your not using the above Linux distribution then click on this official Docker link below to know exactly what commands you need to execute to install Docker ...

Get the Dockerfile and extra setup notes here ...

Ask me A Question ...

Subscribe to MVP Java ...

Follow me ...
Рекомендации по теме
Комментарии
Автор

Very good video with many helpful explanations - thank you!

wiebitteistjatoll
Автор

Great work! But do you know how can I get a dockerized development environment with JDK9 + Eclipse Oxygen 2? Thanks.

ximodante
Автор

very helpful video, it would be even better if you do it with intellij

DungNguyen-sqsy
Автор

I am getting the error xhost:command not found, can anyone help me

aamirmeman
Автор

Thanks for sharing details. If I have to install, I have to pull your image which contains NetBeans 8.2. My concern is how to create an image which contains Eclipse, JDK, Tomcat, Maven and Oracle Database. Please suggest me ways to create image and share with my team members. Thanks

manishsinha
Автор

Thanks for sharing.
I tried to modify Docker file to install java fx and maven to run in the container.
I am brand new with docker and I would be thankful if I could get some help. Thanks

kalmogostanislas
Автор

I pulled the image, anapsix/alpine-java but did not get the Dockerfile. please advise.

tedshear
Автор

Great tutorial. The netbeans UI does not show up when run the netbeansDockerRun.sh script. I get a warning saying "An instance of the program cannot access specified user directory. This is a serious problem that may prevent the program to function properly. Make sure /home/netbeans/.netbeans/8.2 is writable", how can I fix this?

normanpilusa
Автор

Very nice tutorial. I used pull command to get the image mvpjava/netbeans:8.2. After starting the container, the Netbeans UI is launched and I get a message, 16 plugin updates found. I install and restart the plugins disappear. I know it is not persisted.
Question: How do i create a new image with the plugins installed? I don't see a command line instruction to update the plugins. As a matter of fact, even if I want to install a new plugin after launching the IDE, I lose it every restart. How can we resolve this issue?

rkramanyou
welcome to shbcf.ru