Skip to content

Commit 098d3ff

Browse files
committed
Always create user config on new shell
1 parent e77a825 commit 098d3ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.devcontainer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
},
77
"remoteEnv": {
88
// Allow X11 apps to run inside the container
9-
"DISPLAY": "${localEnv:DISPLAY}",
9+
"DISPLAY": "${localEnv:DISPLAY}"
1010
},
1111
// Create the config folder for the user modifiable terminal-config and the uv cache
12-
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config ${localEnv:HOME}/.cache/uv",
12+
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config ${localEnv:HOME}/.cache/uv",
1313
"runArgs": [
1414
// Allow the container to access the host X11 display and EPICS CA
1515
"--net=host",
1616
// Make sure SELinux does not disable with access to host filesystems like tmp
1717
"--security-opt=label=disable"
1818
],
19-
// Populate the user's terminal config folder with default config if it is blank
20-
"onCreateCommand": "/root/terminal-config/ensure-user-terminal-config.sh",
2119
"mounts": [
2220
// Mount in the user terminal config folder so it can be edited
2321
{
@@ -33,5 +31,5 @@
3331
}
3432
],
3533
// Mount the parent as /workspaces so we can pip install peers as editable
36-
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
34+
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind"
3735
}

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ ENV USER_TERMINAL_CONFIG=/user-terminal-config
3030
# This can be overridden by the user mounting a different folder over the top
3131
RUN /root/terminal-config/ensure-user-terminal-config.sh && \
3232
ln -fs $USER_TERMINAL_CONFIG/inputrc /root/.inputrc && \
33-
ln -fs $USER_TERMINAL_CONFIG/bashrc /root/.bash_aliases && \
34-
echo 'source ${USER_TERMINAL_CONFIG}/zshrc' > /root/.zshrc
33+
echo '/root/terminal-config/ensure-user-terminal-config.sh' >> /root/.bashrc \
34+
echo 'source ${USER_TERMINAL_CONFIG}/bashrc' >> /root/.bashrc \
35+
echo '/root/terminal-config/ensure-user-terminal-config.sh' > /root/.zshrc \
36+
echo 'source ${USER_TERMINAL_CONFIG}/zshrc' >> /root/.zshrc
3537

3638
# Install uv using the official image
3739
# See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

0 commit comments

Comments
 (0)