File: Dockerfile

package info (click to toggle)
aws-crt-python 0.16.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,328 kB
  • sloc: ansic: 330,743; python: 18,949; makefile: 6,271; sh: 3,712; asm: 754; cpp: 699; ruby: 208; java: 77; perl: 73; javascript: 46; xml: 11
file content (62 lines) | stat: -rw-r--r-- 2,690 bytes parent folder | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# escape=`

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

# copy dotnet core install file
# A copy of this can be found in s3://aws-crt-build-resources
COPY ["docker-assets/dotnet-install.ps1", "C:/Program Files/"]

# Install required dotnet distributions
RUN ["powershell.exe", "-File", "C:/Program Files/dotnet-install.ps1", "-Version", "5.0.100", "-InstallDir", "C:/Program Files/dotnet", "-NoCdn"]

ENV `
    # Enable detection of running in a container
    DOTNET_RUNNING_IN_CONTAINER=true `
    # Enable correct mode for dotnet watch (only mode supported in a container)
    DOTNET_USE_POLLING_FILE_WATCHER=true `
    # Skip extraction of XML docs - generally not useful within an image/container - helps performance
    NUGET_XMLDOC_MODE=skip

# Install PowerShell Core
RUN dotnet tool install --global PowerShell

# We want to use pwsh from now on
SHELL ["pwsh", "-Command"]

# Install Needed AWS PowerShell modules
RUN `
    Install-Module -Name AWS.Tools.Common -Scope CurrentUser -Force; `
    Install-Module -Name AWS.Tools.SecretsManager -Scope CurrentUser -Force; `
    Install-Module -Name AWS.Tools.SecurityToken -Scope CurrentUser -Force; `
    Install-Module -Name AWS.Tools.CodeArtifact -Scope CurrentUser -Force; `
    Install-Module -Name AWS.Tools.S3 -Scope CurrentUser -Force; `
    Install-Module -Name AWS.Tools.DynamoDBv2 -Scope CurrentUser -Force;

# The default shell for this image is pwsh
CMD ["pwsh"]

# Microsoft made building 3.5 with dotnet build difficult. We need to provide all the reference assemblies ourselves.
# A copy of the zipped assemblies can be found in: s3://aws-crt-build-resources
COPY ["docker-assets/35-reference-assemblies", "C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETFramework/v3.5/Profile/Client"]

SHELL ["powershell"]

RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
RUN choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y --no-progress

# install visualcpp-build-tools
RUN powershell -NoProfile -InputFormat None -Command `
    choco install git 7zip -y; `
    choco install visualstudio2019-workload-vctools -y

#Install AWS CLI
RUN Invoke-WebRequest -UseBasicParsing https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi -OutFile AWSCLI64PY3.msi; `
    Start-Process "msiexec.exe"  -ArgumentList '/i', 'AWSCLI64PY3.msi', '/qn', '/norestart' -Wait -NoNewWindow; `
    Remove-Item -Force AWSCLI64PY3.msi; 

#ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&