mirror of https://github.com/nextcloud/server
Devcontainer: move git setup to postStartCommand
* postCreateCommand is executed too early * If git config commands run in postCreate, a global .gitconfig will be created * Copy of local .gitconfig will be skipped if .gitconfig already exists in container * Move to later stage * https://github.com/devcontainers/cli/issues/98 * https://github.com/microsoft/vscode-remote-release/issues/4855#issuecomment-831920085 Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
cdc2f38a51
commit
9dd158b70d
|
@ -3,6 +3,7 @@
|
|||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "nextclouddev",
|
||||
"postCreateCommand": ".devcontainer/setup.sh",
|
||||
"postStartCommand": ".devcontainer/postStart.sh",
|
||||
"forwardPorts": [
|
||||
80,
|
||||
8080,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set git safe.directory
|
||||
git config --global --add safe.directory /var/www/html
|
||||
git config --global --add safe.directory /var/www/html/3rdparty
|
|
@ -3,10 +3,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
|
|||
|
||||
cd $DIR/
|
||||
|
||||
# Set git safe.directory
|
||||
git config --global --add safe.directory /var/www/html
|
||||
git config --global --add safe.directory /var/www/html/3rdparty
|
||||
|
||||
git submodule update --init
|
||||
|
||||
# Codespace config
|
||||
|
|
Loading…
Reference in New Issue