-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (40 loc) · 1.68 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (40 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Microsoft VS Code Server running in a browser with support for Powershell and PowerCLI
#
# To build this image, run:
#
# docker login
# docker build . -t {docker_username}/{tag_key}:{tag_value}
# docker push {docker_username}/{tag_key}:{tag_value}
#
# For example:
#
# docker login
# If you receieve error `Cannot autolaunch D-Bus without X11 $DISPLAY`, it is trying to use a GUI credential helper, install "pass" using "sudo apt-get install pass gnupg2".
# docker build . -t bobbywaz/vscode-pwsh:stable
# docker push bobbywaz/vscode-pwsh:stable
# Download base image for LinuxServer vscode
FROM linuxserver/code-server
# LABEL
LABEL maintainer="[email protected]"
LABEL version="0.1"
LABEL description="(vs)code with PowerShell and PowerCLI installed"
# Set Working directory
WORKDIR /root
# Update repos and install wget
RUN apt-get update && apt-get install wget -y
# Upgrade all software
RUN sudo apt-get upgrade -y
# Install requirement that won't install automatically
RUN sudo apt-get install -y liblttng-ust0 libicu60 curl
# Get powershell installation
RUN wget -O /root/powershell.deb https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/powershell_7.0.3-1.ubuntu.18.04_amd64.deb
# Install Powershell
RUN sudo dpkg -i /root/powershell.deb
# Start Powershell
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install PowerCLI
RUN Install-Module -Name VMware.PowerCLI -Scope AllUsers -force
# Configure PoweCLI settings
RUN Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -DefaultVIServerMode Multiple -DisplayDeprecationWarnings $false -Confirm:$false
# Entry point
ENTRYPOINT ["/init"]