Merge pull request #66 from valet-customers/codespace-defaults
Add default settings and environment variables in codespace
This commit is contained in:
@@ -2,20 +2,31 @@
|
|||||||
"name": "Codespace to perform Valet Labs",
|
"name": "Codespace to perform Valet Labs",
|
||||||
"image": "mcr.microsoft.com/vscode/devcontainers/universal:linux",
|
"image": "mcr.microsoft.com/vscode/devcontainers/universal:linux",
|
||||||
"remoteUser": "codespace",
|
"remoteUser": "codespace",
|
||||||
"overrideCommand": false,
|
"overrideCommand": false,
|
||||||
"mounts": [
|
"mounts": [
|
||||||
"source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"
|
"source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"
|
||||||
],
|
],
|
||||||
"runArgs": [
|
"runArgs": [
|
||||||
"--cap-add=SYS_PTRACE",
|
"--cap-add=SYS_PTRACE",
|
||||||
"--security-opt",
|
"--security-opt",
|
||||||
"seccomp=unconfined",
|
"seccomp=unconfined",
|
||||||
"--privileged",
|
"--privileged",
|
||||||
"--init"
|
"--init"
|
||||||
],
|
],
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
"remoteEnv": {
|
||||||
"extensions": [
|
"DOCKER_ARGS": "--network=host",
|
||||||
"ms-azuretools.vscode-docker"
|
"INSTALLATION_TYPE": "labs"
|
||||||
],
|
},
|
||||||
"postCreateCommand": "gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' "
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"settings": {
|
||||||
|
"files.autoSave": "onFocusChange",
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"extensions": [
|
||||||
|
"ms-azuretools.vscode-docker"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"postCreateCommand": "gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' "
|
||||||
}
|
}
|
||||||
@@ -33,10 +33,6 @@ else
|
|||||||
docker exec -it gitlab update-permissions &> /dev/null
|
docker exec -it gitlab update-permissions &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# allow valet to talk to GitLab by removing network isolation between containers
|
|
||||||
export DOCKER_ARGS="--network=host"
|
|
||||||
`grep -q "export DOCKER_ARGS=" ~/.bashrc || echo 'export DOCKER_ARGS="--network=host"' >> ~/.bashrc`
|
|
||||||
|
|
||||||
echo -e "Waiting for GitLab to be ready. This might take a while \U23F0"
|
echo -e "Waiting for GitLab to be ready. This might take a while \U23F0"
|
||||||
until $(curl --output /dev/null --silent --head --fail http://localhost); do
|
until $(curl --output /dev/null --silent --head --fail http://localhost); do
|
||||||
printf '.'
|
printf '.'
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ else
|
|||||||
docker run -d --name jenkins -p 8080:8080 --env JENKINS_ADMIN_ID=$username --env JENKINS_ADMIN_PASSWORD=$password jenkins:$container_name
|
docker run -d --name jenkins -p 8080:8080 --env JENKINS_ADMIN_ID=$username --env JENKINS_ADMIN_PASSWORD=$password jenkins:$container_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# allow valet to talk to Jenkins by removing network isolation between containers
|
|
||||||
export DOCKER_ARGS="--network=host"
|
|
||||||
grep -q "export DOCKER_ARGS=" ~/.bashrc || echo 'export DOCKER_ARGS="--network=host"' >> ~/.bashrc
|
|
||||||
|
|
||||||
echo -e "\nWaiting for Jenkins to start..."
|
echo -e "\nWaiting for Jenkins to start..."
|
||||||
while ! curl -s http://localhost:8080/ > /dev/null; do
|
while ! curl -s http://localhost:8080/ > /dev/null; do
|
||||||
printf "."
|
printf "."
|
||||||
|
|||||||
Reference in New Issue
Block a user