builds a docker image to run idea in a container, which is based on kasmtech/workspaces-images.
- prepared dev envs: python3、maven-3.9、jdk17、nvm
- bundle jetbrains idea community, support projector server and windowed mode
- postponed ide.tar.gz decompression to
init_services.sh
reduce image size - change ubuntu tsinghua mirrors、nvm mirrors using
chsrc
- Run the container as a daemon.
--shm-size
default is 64MB not enough xfdesktop used, can be listed byipcs -m --human
IMAGE=registry.cn-hangzhou.aliyuncs.com/hylstudio/workspace:2024100901-skykoma-workspace
# IMAGE=registry.hylstudio.local/skykoma-workspace:2024100901
docker run -d --name skykoma-workspace --hostname=ubuntu --shm-size=512m \
-e LOCAL_USER_UID=0 -e PERSISTENT_HOME=1 -e PERSISTENT_HOME_DIR=/data/root \
-e VNC_PW=password \
-e PROJECTOR_SERVER_TOKEN=123456 \
-p 6901:6901 \
-p 2222:22 \
-p 8887:8887 \
-v /data:/data \
$IMAGE
- vnc server avaliable pm https://localhost:6901 with basic auth
- User : kasm_user
- Password: see env $VNC_PW
- projector server avaliable on http://localhost:8887 when switch to projector mode
- add query params token when env PROJECTOR_SERVER_TOKEN has been set, such as http://localhost:8887?token=123456
- TODO add more env explain, refer from here.
see build.sh
and DockefFile
for all details
kasm_entrypoint.sh
- persist home dir if env
PERSISTENT_HOME
andPERSISTENT_HOME_DIR
has been set
- persist home dir if env
init_services.sh
- unzip idea package if
$PROJECTOR_DIR/ide/ide.tar.gz
exists - init idea
idea.properties
andidea64.vmoptions
- disable tips of the day
- disable auto update and new version check
- open idea internal actions menu
- unzip idea package if
kasm_default_profile.sh
andvnc_startup.sh
is kasm official file- skip openssl self sign req in
vnc_startup.sh
if cert file already exists
- skip openssl self sign req in
custom_startup.sh
will be executed byvnc_startup.sh
on kasm starup seq- init
/tmp/autorestart
with value1
- kasm_startup will be execute
- check process using
pgrep -f com.intellij.idea.Main
, autorestart if process not exists - if
/tmp/autorestart
not been disabled, execute/projector/ide/bin/idea.sh
and idea.sh subprocess will not exit
- init
projector_entrypoint.sh
andnormal_idea_entrypoint.sh
- switch projector mode and windowed mode by changing /tmp/autorestart
- TODO replace START_COMMAND depends on env settings on startup
- Thanks kasmtech for providing some great open source tools.