generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup remote container and Codespaces configuration (#17)
* Add vanilla Debian devcontainer config files Based on: https://github.com/microsoft/vscode-dev-containers/blob/master/containers/debian/.devcontainer * Set Zsh as default container terminal Zsh is already installed, so this was just a case of changing the VS Code configuration setting. * Use dark colour theme on remote containers * Install shellcheck extension on remote containers * Add docker extension on remote containers * Add yaml extension on remote containers * Add commented out devcontainer postCreateCommand Added it so it's there for reference. * Fix editor problem for git commit messages We now check for either `code` or `code-insiders` to be the editor. * Enable VS Code commit signing flag All this flag does is to add `-S` when calling git commit[1] from within VS Code. [1] microsoft/vscode#97300 (comment)
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Based on the example Dockerfile at: | ||
# https://github.com/microsoft/vscode-dev-containers/blob/master/containers/debian/.devcontainer/Dockerfile | ||
|
||
# Update the VARIANT arg in devcontainer.json to pick an Debian version: buster (or debian-10), stretch (or debian-9) | ||
ARG VARIANT=buster | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT} | ||
|
||
# Configure VSCode as the default editor for git commits | ||
# Adapted from https://github.com/microsoft/vscode-dev-containers/blob/master/containers/codespaces-linux/.devcontainer/Dockerfile | ||
ARG GIT_EDITOR_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/containers/codespaces-linux/.devcontainer/git-ed.sh" | ||
RUN mkdir -p /tmp/git-ed \ | ||
&& curl -sSL ${GIT_EDITOR_SCRIPT_SOURCE} -o /tmp/git-ed/git-ed.sh \ | ||
&& install -m 755 /tmp/git-ed/git-ed.sh /usr/local/bin/git-ed.sh \ | ||
&& git config --global core.editor "/usr/local/bin/git-ed.sh" \ | ||
# Clean up | ||
&& rm -rf /tmp/git-ed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "Docker Container GitHub Action development", | ||
"dockerFile": "Dockerfile", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/zsh", | ||
"workbench.colorTheme": "Default Dark+", | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"timonwong.shellcheck", | ||
"ms-azuretools.vscode-docker", | ||
"redhat.vscode-yaml" | ||
] | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. | ||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
|
||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust | ||
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
|
||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
// "remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"git.enableCommitSigning": true, | ||
|
||
} |