mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
chore: enhance devcontainer setup with command history and GPG signing scripts
This commit is contained in:
@@ -18,6 +18,8 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends chromium gnupg2 \
|
&& apt-get install -y --no-install-recommends chromium gnupg2 \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& corepack enable \
|
&& corepack enable \
|
||||||
&& mkdir -p ${PNPM_HOME} /home/node/.pnpm-store \
|
&& mkdir -p ${PNPM_HOME} /home/node/.pnpm-store /commandhistory \
|
||||||
&& chown -R node:node /home/node/.local /home/node/.pnpm-store
|
&& touch /commandhistory/.bash_history \
|
||||||
|
&& chown -R node:node /home/node/.local /home/node/.pnpm-store /commandhistory \
|
||||||
|
&& echo "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" >> /home/node/.bashrc
|
||||||
USER node
|
USER node
|
||||||
|
|||||||
@@ -52,11 +52,14 @@
|
|||||||
"CHROME_BIN": "/usr/bin/chromium"
|
"CHROME_BIN": "/usr/bin/chromium"
|
||||||
},
|
},
|
||||||
|
|
||||||
"mounts": ["source=alfresco-ng2-pnpm-store,target=/home/node/.pnpm-store,type=volume"],
|
"mounts": [
|
||||||
|
"source=workspace-pnpm-store,target=/home/node/.pnpm-store,type=volume",
|
||||||
|
"source=workspace-bashhistory,target=/commandhistory,type=volume"
|
||||||
|
],
|
||||||
|
|
||||||
"postCreateCommand": "pnpm install --frozen-lockfile",
|
"postCreateCommand": ".devcontainer/post-create.sh",
|
||||||
|
|
||||||
"postStartCommand": "if [ -f .git/signing.pub ]; then gpg --import .git/signing.pub; fi",
|
"postStartCommand": ".devcontainer/post-start.sh",
|
||||||
|
|
||||||
"runArgs": ["--cap-drop=ALL", "--security-opt=no-new-privileges:true", "--pids-limit=512"]
|
"runArgs": ["--cap-drop=ALL", "--security-opt=no-new-privileges:true", "--pids-limit=512"]
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
|
||||||
|
sudo chown -R "$(whoami)": /commandhistory
|
||||||
|
fi
|
||||||
|
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ -f .git/signing.pub ]; then
|
||||||
|
gpg --import .git/signing.pub
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user