Skip to content

kickstart #DevOps with sharable workplace inside #docker containing latest #IntelliJ Idea Community Edition and JDK8

Notifications You must be signed in to change notification settings

elasticjava/idea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Idea in Docker

dockerized IntelliJ Idea Community Edition


Kickstart your DevOps Java workplace with Docker

kickstart your dev environment with a sharable workplace inside a docker container
containing the latest IntelliJ Idea Community Edition and Java 8

  1. install docker

  2. if you have another UID/GID than 1000 please change the Dockerfile and replace export uid=1000 gid=1000
    with your user / group id inside the Dockerfile. You might run the following script for that task:

    sed -i "s/export uid=1000 gid=1000/export uid=$UID gid=${GROUPS[0]}/" Dockerfile

    You might want to change these values everytime you check out the file from git and revert the replacement before you checkin the changed Dockerfile. Run the following on your host (and adjust the file .gitattributes if you change the name uidfix) to make that possible:

    git config filter.uidfix.smudge "sed \"s/export uid=1000 gid=1000/export uid=$UID gid=${GROUPS[0]}/\""
    git config filter.uidfix.clean "sed \"s/export uid=$UID gid=${GROUPS[0]}/export uid=1000 gid=1000/\""
  3. build the dockerized IntelliJ Idea image:

    docker build -t elasticjava/idea:v1 .
  4. Idea needs a few configuration steps initially to reduce the popup screens. so first start docker via

    docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/usr/local/src --net=host elasticjava/idea:v1

    and configure IntelliJ your favourite way, install plugins and define codestyles.

  5. quit the running Idea and conserve the last image state as new image without noise:

    docker commit $(docker ps -a -f ancestor=elasticjava/idea:v1 -n=1 -q) idea
  6. now you can run IntelliJ Idea anywhere inside your favourite source folder with:

    docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/usr/local/src --net=host idea

have happy ideas!

About

kickstart #DevOps with sharable workplace inside #docker containing latest #IntelliJ Idea Community Edition and JDK8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published