Skip to content

Commit 012b0ef

Browse files
committed
Install man in the background
Also change staging area to /tmp/bash-config and add a do not modify note
1 parent 18a60ce commit 012b0ef

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.devcontainer/features/bash-config/config/bash-config-rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
# default opinioned bash configuration
4+
# DO NOT MODIFY if installed in /bash-config
5+
# this file will be overwritten on each container launch
46

57
# enable enternal shared history
68
export HISTCONTROL=ignoreboth:erasedups
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# this script is run once inside the developer container after creation time
4+
5+
# Install man so we can do git <command> --help
6+
apt-get update && apt-get install -y --no-install-recommends man

.devcontainer/features/bash-config/devcontainer-feature.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"documentationURL": "https://raw.githubusercontent.com/DiamondLightSource/devcontainer-features/refs/heads/main/.devcontainer/features/bash-config/README.md",
99
"containerEnv": {
1010
"CONFIG_FOLDER": "/bash-config",
11-
"CONFIG_STAGING": "/bash-config-staging"
11+
"CONFIG_STAGING": "/tmp/bash-config"
1212
},
1313
"mounts": [
1414
{
@@ -17,5 +17,6 @@
1717
"type": "bind"
1818
}
1919
],
20-
"onCreateCommand": "bash /bash-config-staging/onCreateCommand.sh"
20+
"onCreateCommand": "bash /tmp/bash-config/onCreateCommand.sh",
21+
"postCreateCommand": "bash /tmp/bash-config/postCreateCommand.sh"
2122
}

test/bash-config/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ source dev-container-features-test-lib
1111
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
1212
# check <LABEL> <cmd> [args...]
1313
check "execute command" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
14+
check "man installed" man -V
1415

1516
# Report results
1617
# If any of the checks above exited with a non-zero exit code, the test will fail.

0 commit comments

Comments
 (0)