blob: fc9bd3b1b6c9f93275f57eddfee63d7fb28393c4 [file] [log] [blame]
# escape=`
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG FROM_IMAGE
FROM ${FROM_IMAGE}
# Dockerfile for image used to install Visual Studio.
# WARNING: Changes to this file will result in an extremely long image rebuild.
SHELL ["powershell", "-ExecutionPolicy", "Unrestricted", "-Command", `
"$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
COPY dockerized_install_visual_studio_2022.ps1 /dockerized_install_visual_studio_2022.ps1
# Pins Visual Studio 2022 release version to 17.4.6 (includes Clang 15.0.1).
# This should be kept in sync with the VS installer used in the dev workstation
# setup script in: `tools/install_visual_studio_22.ps1`
ARG MSVS_INSTALLER_URL="https://download.visualstudio.microsoft.com/download/pr/d1ed8638-9e88-461e-92b7-4e29cc6172c3/38b09fc09ae9e590b73ae6752a0ebfd62579798969041bd341689273b842bc10/vs_BuildTools.exe"
RUN C:\dockerized_install_visual_studio_2022.ps1 ${env:MSVS_INSTALLER_URL}
ENV VSINSTALLDIR "C:\BuildTools"
ENV VISUAL_STUDIO_VERSION "2022"