This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
/
dockerfile
32 lines (30 loc) · 1.5 KB
/
dockerfile
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
FROM ubuntu:18.04
WORKDIR /usr/src/app
COPY . ./
RUN apt-get update \
&& apt-get install -y wget unzip \
&& rm -rf /var/lib/apt/lists \
&& wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y powershell \
&& pwsh -Command "Install-Module -Name Az -Force" \
&& pwsh -Command "Install-Module -Name Pester -Force" \
&& pwsh -Command "Install-Module -Name Az.ResourceGraph -Force" \
&& pwsh -Command "Install-Module -Name Az.Accounts -Force" \
&& export VER="1.4.1" \
&& wget -q https://releases.hashicorp.com/packer/${VER}/packer_${VER}_linux_amd64.zip \
&& unzip packer_${VER}_linux_amd64.zip \
&& mv packer /usr/local/bin \
&& apt-get install -y curl apt-transport-https lsb-release gnupg \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null \
&& AZ_REPO=$(lsb_release -cs) \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list \
&& apt-get install apt-transport-https \
&& apt-get update \
&& apt-get install azure-cli \
&& apt-get install -y dotnet-sdk-2.2 \
&& dotnet build Orchestration/OrchestrationService/TopologicalSort/TopologicalSort.csproj --configuration Release
RUN chmod 755 /usr/src/app
COPY entrypoint1.ps1 /usr/src/app/entrypoint1.ps1
ENTRYPOINT [ "pwsh", "-c", "./entrypoint1.ps1" ]