rycus86 / docker-intellij-idea Goto Github PK
View Code? Open in Web Editor NEWDocker container to run IntelliJ IDEA Community Edition
License: MIT License
Docker container to run IntelliJ IDEA Community Edition
License: MIT License
java.lang.NoClassDefFoundError
being thrown while running a container.Please add a warning about this in README, thank you :)
Error should look something like this:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
Well, actually, it is rather simple to solve this issue. See, when you are running a graphical application on any linux distro, it most definitely will try to create a connection to the X server. But in some cases there will be a security extension called Xsecurity and it will try to prevent such behavior by default.
To allow your containers to connect to the X server you'll need to use another X utility called xhost
. But first you want to install it if you don't have one. Find a package name with this utility on your distro's repositories (e.g.: on Arch-based distros it will be in xorg-xhost
package). Then use it to allow all local connections:
xhost +local:
Or just allow them to a root user only:
xhost +si:localuser:root
Hi.
I tried to run:
docker run --rm \ -e DISPLAY=${DISPLAY} \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v ~/.Idea:/home/developer/.Idea \ -v ~/.Idea.java:/home/developer/.java \ -v ~/.Idea.maven:/home/developer/.m2 \ -v ~/.Idea.gradle:/home/developer/.gradle \ -v ~/.Idea.share:/home/developer/.local/share/JetBrains \ -v ~/Project:/home/developer/Project \ --name idea-$(head -c 4 /dev/urandom | xxd -p)-$(date +'%Y%m%d-%H%M%S') \ rycus86/intellij-idea:latest
it results in:
Startup Error: Unable to detect graphics environment
What can I do?
My OS is OSX 10.13.6 High Sierra and Docker version 19.03.4, build 9013bf5
Thanks.
If I add "-v ~/etc:/etc" to the docker run command, IDEA will be looking at the "?" folder in the current WORKDIR for configrations. Any idea? Thanks.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.ide.ClassUtilCore to field sun.net.www.protocol.jar.JarFileFactory.fileCache
WARNING: Please consider reporting this to the maintainers of com.intellij.ide.ClassUtilCore
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Fontconfig error: Cannot load default config file
Jul 30, 2019 9:14:14 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Jul 30, 2019 9:14:14 AM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background ?/.java/.userPrefs/prefs.xml
Fontconfig error: Cannot load default config file
Error when running this image:
Run with this command:
$ docker run -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.Idea:/home/developer/.Idea -v ~/.Idea.java:/home/developer/.java -v ~/.Idea.maven:/home/developer/.m2 -v ~/.Idea.gradle:/home/developer/.gradle -v ~/.IdeaIC2018.2:/home/developer/.IdeaIC2018.2 -v ~/elephantrobotics/src/cat/jcat:/home/developer/jcat --name intellij-idea-elephant-jcat rycus86/intellij-idea:2018.2.4
Output:
Invalid Config Path: Config path '/home/developer/.IdeaIC2018.2/config' is invalid.
If you have modified the 'idea.config.path' property, please make sure it is correct,
otherwise please re-install the IDE.
And container exits with exit code 5.
$ docker --version
Docker version 18.06.1-ce, build e68fc7a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.