Skip to content

Commit 4b24b1d

Browse files
author
Teodor Kostadinov
authored
Initial version (#2)
1 parent b2ea529 commit 4b24b1d

16 files changed

+1063
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM mcr.microsoft.com/powershell:lts-debian-10
2+
3+
# [Option] Install zsh
4+
ARG INSTALL_ZSH="true"
5+
# [Option] Upgrade OS packages to their latest versions
6+
ARG UPGRADE_PACKAGES="false"
7+
8+
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
9+
ARG USERNAME=vscode
10+
ARG USER_UID=1000
11+
ARG USER_GID=$USER_UID
12+
COPY library-scripts/*.sh /tmp/library-scripts/
13+
RUN apt-get update \
14+
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
15+
&& chsh "${USERNAME}" -s "$(which pwsh)" \
16+
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
17+
18+
# [Optional] Uncomment this section to install additional packages.
19+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
20+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/powershell
3+
{
4+
"name": "PowerShell",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": { },
9+
10+
// Add the IDs of extensions you want installed when the container is created.
11+
"extensions": [
12+
"ms-vscode.powershell"
13+
],
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Uncomment the next line to run commands after the container is created. This gets run in bash which is why we call `pwsh`.
19+
// "postCreateCommand": "pwsh -c '$PSVersionTable'",
20+
21+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
22+
"remoteUser": "vscode"
23+
}

0 commit comments

Comments
 (0)