Ver código fonte

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>
tags/v28.0.0beta1
Robin Windey 8 meses atrás
pai
commit
9dd158b70d
Nenhuma conta vinculada ao e-mail do autor do commit

+ 1
- 0
.devcontainer/devcontainer.json Ver arquivo

@@ -3,6 +3,7 @@
"dockerComposeFile": "docker-compose.yml",
"service": "nextclouddev",
"postCreateCommand": ".devcontainer/setup.sh",
"postStartCommand": ".devcontainer/postStart.sh",
"forwardPorts": [
80,
8080,

+ 5
- 0
.devcontainer/postStart.sh Ver arquivo

@@ -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

+ 0
- 4
.devcontainer/setup.sh Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar