This Dockerfile configures a container for Java development using LunarVim on an Alpine Linux base. It's tailored for a Python 3 environment, enhanced with Java Development Kit (JDK) and other essential development tools.
- Python Alpine Base: Uses Python Alpine image; Python version defined by
PYTHON_VERSION. - JDK Version Argument: JDK version is set with
JDK_VERSION.
- Updates and upgrades the package manager, sets Bash as the default shell.
- Installs utilities (zip, unzip, curl, git), OpenJDK, Maven, Make, G++, npm, and others.
- Installs
neovimfor LunarVim andfontconfigfor fonts. - Installs
linksweb browser.
- Installs and configures Rust, adding tools like
ripgrepandfd-find.
- Installs LunarVim; customizes configuration for Java IDE.
- Clones and sets up Java development tools (
eclipse.jdt.ls,java-debug,vscode-java-test). - Downloads Lombok and configures fonts.
- Updates LunarVim configuration.
- Installs Zsh, Oh My Zsh, configures theme, installs
zsh-vcs.
- Sets Zsh as the container's entry point.
- Refer to
cmd.shfor build and run instructions.
- Ensure appropriate Python and JDK versions before building.
The container is available on Docker Hub.
- Pull the image
docker pull israiloff/lvim:latest- Create a container
docker run -it -d -p 33235:33235 -p 8090-8099:8090-8099 -v /var/run/docker.sock:/var/run/docker.sock --name lvim israiloff/lvim:latestNote: The
-v /var/run/docker.sock:/var/run/docker.sockoption is required for Docker-in-Docker (DinD) functionality.
Note: The
-p 33235:33235option is required for exposing themarkdown-previewport.
Note: The
-p 8090-8099:8090-8099option is optional for exposing your Java server ports.
- Start the container
docker start lvim- Connect to the container
docker exec -it lvim /bin/zsh