Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Development Environment with .devcontainer #493

Merged
merged 6 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# from: https://github.com/microsoft/vscode-dev-containers/blob/14b53bf68f467dc6fe1a1a378ba10b9db9e6d318/containers/dotnet/.devcontainer/Dockerfile
# and: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/powershell/.devcontainer/Dockerfile

ARG DOTNET_VARIANT=6.0-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${DOTNET_VARIANT}

ARG INSTALL_ZSH="true"
ARG UPGRADE_PACKAGES="true"

# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
COPY library-scripts/*.sh /tmp/library-scripts/
RUN apt-get update \
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
&& chsh "${USERNAME}" -s "$(which pwsh)" \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts

# Download the latest stable `nuget.exe` to `/usr/local/bin`
RUN curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
RUN chmod +x /usr/local/bin/nuget.exe


# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "AtlassianPS Dev Environment",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": [
"DavidAnson.vscode-markdownlint",
"editorconfig.editorconfig",
"formulahendry.code-runner",
// "github.codespaces",
// "github.vscode-github-actions",
// "github.vscode-pull-request-github",
"ms-vscode.PowerShell",
"jasonnutter.vscode-codeowners",
"streetsidesoftware.code-spell-checker",
"pspester.pester-test"
// "davidanson.vscode-markdownlint",
// "github.copilot",
// "eamodio.gitlens",
]
}
},
"postCreateCommand": "pwsh -c './Tools/setup.ps1'",
"remoteUser": "vscode"
}
Loading