Files
infra/ansible/roles/profile_workstation_dev_wsl/templates/ecaas-devcontainer.json.j2
Fabio Scotto di Santolo 25a3b97b14 Persist Bash history in WSL devcontainers
Mount a per-devcontainer history directory from the WSL host and point
HISTFILE at it so shell history survives container rebuilds.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-11 19:04:19 +01:00

60 lines
2.1 KiB
Django/Jinja

{
"name": "ecaas — Java 11",
"build": {
"dockerfile": "Dockerfile",
"args": {
"MAVEN_VERSION": {{ workstation_maven_version | to_json }}
}
},
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude",
"HISTFILE": "/home/vscode/.bash_history.d/history"
},
"remoteEnv": {
"ANTHROPIC_AUTH_TOKEN": "${localEnv:ANTHROPIC_AUTH_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
},
"mounts": [
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/git,target=/run/ecaas-git,readonly') | to_json }},
{% for ca in ecaas_git_available_cas %}
{{ ('type=bind,source=' ~ user_home ~ '/.local/share/certs/' ~ ca.certificate ~ ',target=/run/ecaas-git-ca/' ~ ca.certificate ~ ',readonly') | to_json }},
{% endfor %}
{{ ('type=bind,source=' ~ user_home ~ '/.config/ai,target=/home/vscode/.config/ai,readonly') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.local/state/devcontainer-bash-history/ecaas,target=/home/vscode/.bash_history.d') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.claude,target=/home/vscode/.claude') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.cline,target=/home/vscode/.cline') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.m2,target=/home/vscode/.m2') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.config/glab-cli,target=/home/vscode/.config/glab-cli') | to_json }}
],
"forwardPorts": [8080],
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"vmware.vscode-boot-dev-pack",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"emmanuelbeziat.vscode-great-icons"
],
"settings": {
"workbench.iconTheme": "vscode-great-icons",
"java.jdt.ls.java.home": "/opt/jdk-21",
"spring-boot.ls.java.home": "/opt/jdk-21",
"java.configuration.runtimes": [
{
"name": "JavaSE-11",
"path": "/usr/lib/jvm/msopenjdk-current",
"default": true
}
]
}
}
}
}