Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

rlindooren/docker-ubuntu-java-kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

docker-ubuntu-java-kotlin

Why

I created this Docker file to have an easy way to build Java/Kotlin projects in a Linux environment on my Macbook.

Please note that it results in quite a big Docker image. It's a quick and dirty worthy approach 😉.

How to use

A pre-build image can be found here: rlindooren/ubuntu-java:latest

cd ~/code/your-project
docker run --rm -ti -v "$PWD:/home/dev/project" rlindooren/ubuntu-java:latest

Build the image (one time):

docker build --build-arg USER="$USER" -t ubuntu-java .

Start the image from your Java/Kotlin project source dir:

cd ~/code/your-project
docker run --rm -ti -v "$PWD:/home/$USER/project" ubuntu-java

Or...

To use dependencies already available on your host system and/or to keep downloaded dependencies as well as using your existing git config:

docker run --rm -ti \
  -v "$HOME/.gradle/:/home/$USER/.gradle/" \
  -v "$HOME/.m2/:/home/$USER/.m2/" \
  -v "$HOME/.konan/:/home/$USER/.konan/" \
  -v "$HOME/.gitconfig:/home/$USER/.gitconfig" \
  -v "$PWD:/home/$USER/project" \
  ubuntu-java

About

Docker file to quickly create an Ubuntu "machine" to build/run/test java projects

Resources

Stars

Watchers

Forks

Packages

No packages published