Skip to content

Commit a1365ba

Browse files
author
Richard Cunningham
committed
initial approach outline
1 parent 06a285a commit a1365ba

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"vscode": {
1414
// Set *default* container specific settings.json values on container create.
1515
"settings": {
16-
"python.defaultInterpreterPath": "/venv/bin/python"
16+
"python.defaultInterpreterPath": "/venv/bin/python",
17+
"python.terminal.activateEnvironment": false
1718
},
1819
// Add the IDs of extensions you want installed when the container is created.
1920
"extensions": [
@@ -28,11 +29,13 @@
2829
}
2930
},
3031
"features": {
31-
// Some default things like git config
32-
"ghcr.io/devcontainers/features/common-utils:2": {
33-
"upgradePackages": false
34-
}
32+
//
33+
"./features": {}
34+
//
3535
},
36+
"initializeCommand": "mkdir -p ~/.config/devcontainer_rc",
37+
//
38+
//
3639
"runArgs": [
3740
// Allow the container to access the host X11 display and EPICS CA
3841
"--net=host",
@@ -41,6 +44,7 @@
4144
],
4245
// Mount the parent as /workspaces so we can pip install peers as editable
4346
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
47+
//also mount: ~/.config/devcontainer_rc ???
4448
// After the container is created, install the python project in editable form
4549
"postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install"
4650
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "BASH terminal configuration",
3+
"id": "BASH",
4+
"version": "1.0.0",
5+
"containerEnv": {
6+
"CONFIG_FOLDER": "/devcontainer_rc"
7+
},
8+
"description": "Make default BASH terminal nicer.",
9+
// "options": {
10+
// "host_config_folder": {
11+
// "type": "string",
12+
// "default": "${localEnv:HOME}/.config/devcontainer_rc",
13+
// "description": "host folder for devcontainer shell configuration"
14+
// }
15+
// },
16+
"mounts": [
17+
{
18+
"source": "${localEnv:HOME}/.config/devcontainer_rc",
19+
"target": "/devcontainer_rc",
20+
"type": "bind"
21+
}
22+
],
23+
"onCreateCommand": "bash .devcontainer/features/onCreateCommand.sh"
24+
// wack below into /devcontainer_rc/.bashrc
25+
// delete this line if you do not want opinionated defaults
26+
// source .devcontainer_rc/.bash_generated.sh
27+
// Add your personal configuration preferences below
28+
// not needed?
29+
// "postCreateCommand": "echo source /.devcontainer_rc/bashrc >> /root/.bashrc"
30+
}

.devcontainer/features/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
touch $CONFIG_FOLDER/feature_settings_rc
4+
touch $CONFIG_FOLDER/bashrc
5+
touch $CONFIG_FOLDER/inputrc

0 commit comments

Comments
 (0)