mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
chore(dev): migrate docker-compose.yml settings to devcontainer.json
- works with codespaces - does not need full paths for host home directory bind mounts
This commit is contained in:
@@ -1,16 +1,51 @@
|
|||||||
{
|
{
|
||||||
|
// See https://containers.dev/implementors/json_reference/
|
||||||
|
// User defined settings
|
||||||
|
"containerEnv": {
|
||||||
|
"TZ": ""
|
||||||
|
},
|
||||||
|
// Fixed settings
|
||||||
"name": "ddns-dev",
|
"name": "ddns-dev",
|
||||||
"dockerComposeFile": [
|
|
||||||
"docker-compose.yml"
|
|
||||||
],
|
|
||||||
"service": "vscode",
|
|
||||||
"runServices": [
|
|
||||||
"vscode"
|
|
||||||
],
|
|
||||||
"shutdownAction": "stopCompose",
|
|
||||||
"postCreateCommand": "~/.windows.sh && go mod download && go mod tidy",
|
"postCreateCommand": "~/.windows.sh && go mod download && go mod tidy",
|
||||||
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
|
"overrideCommand": true,
|
||||||
|
"service": "vscode",
|
||||||
"workspaceFolder": "/workspace",
|
"workspaceFolder": "/workspace",
|
||||||
// "overrideCommand": "",
|
"mounts": [
|
||||||
|
// Source code
|
||||||
|
{
|
||||||
|
"source": "../",
|
||||||
|
"target": "/workspace",
|
||||||
|
"type": "bind"
|
||||||
|
},
|
||||||
|
// Zsh commands history persistence
|
||||||
|
{
|
||||||
|
"source": "${localEnv:HOME}/.zsh_history",
|
||||||
|
"target": "/root/.zsh_history",
|
||||||
|
"type": "bind"
|
||||||
|
},
|
||||||
|
// Git configuration file
|
||||||
|
{
|
||||||
|
"source": "${localEnv:HOME}/.gitconfig",
|
||||||
|
"target": "/root/.gitconfig",
|
||||||
|
"type": "bind"
|
||||||
|
},
|
||||||
|
// SSH directory for Linux, OSX and WSL
|
||||||
|
// On Linux and OSX, a symlink /mnt/ssh <-> ~/.ssh is
|
||||||
|
// created in the container. On Windows, files are copied
|
||||||
|
// from /mnt/ssh to ~/.ssh to fix permissions.
|
||||||
|
{
|
||||||
|
"source": "${localEnv:HOME}/.ssh",
|
||||||
|
"target": "/mnt/ssh",
|
||||||
|
"type": "bind"
|
||||||
|
},
|
||||||
|
// Docker socket to access the host Docker server
|
||||||
|
{
|
||||||
|
"source": "/var/run/docker.sock",
|
||||||
|
"target": "/var/run/docker.sock",
|
||||||
|
"type": "bind"
|
||||||
|
}
|
||||||
|
],
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
|||||||
@@ -1,27 +1,3 @@
|
|||||||
version: "3.7"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
vscode:
|
vscode:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
|
||||||
- ../:/workspace
|
|
||||||
# Docker socket to access Docker server
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
# SSH directory for Linux, OSX and WSL
|
|
||||||
# On Linux and OSX, a symlink /mnt/ssh <-> ~/.ssh is
|
|
||||||
# created in the container. On Windows, files are copied
|
|
||||||
# from /mnt/ssh to ~/.ssh to fix permissions.
|
|
||||||
- ~/.ssh:/mnt/ssh
|
|
||||||
# Shell history persistence
|
|
||||||
- ~/.zsh_history:/root/.zsh_history
|
|
||||||
# Git config
|
|
||||||
- ~/.gitconfig:/root/.gitconfig
|
|
||||||
environment:
|
|
||||||
- TZ=
|
|
||||||
cap_add:
|
|
||||||
# For debugging with dlv
|
|
||||||
- SYS_PTRACE
|
|
||||||
security_opt:
|
|
||||||
# For debugging with dlv
|
|
||||||
- seccomp:unconfined
|
|
||||||
entrypoint: [ "zsh", "-c", "while sleep 1000; do :; done" ]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user