Skip to content

Commit 696b3b3

Browse files
author
Xin Wang
committed
Install PowerShell in Linux .NET image and update .NET SDK version
1 parent 893901c commit 696b3b3

File tree

25 files changed

+93
-46
lines changed

25 files changed

+93
-46
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The following images are actively maintained by AWS CodeBuild, and are listed in
3838
+ [android-java-8 26.1.1](ubuntu/android-java-8/26.1.1)
3939
+ [docker 17.09.0](ubuntu/docker/17.09.0)
4040
+ [dot-net core-1](ubuntu/dot-net/core-1)
41+
+ [dot-net core-2.1](ubuntu/dot-net/core-2.1)
4142
+ [dot-net core-2](ubuntu/dot-net/core-2)
4243
+ [golang 1.10](ubuntu/golang/1.10)
4344
+ [java openjdk-8](ubuntu/java/openjdk-8)

buildspec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ phases:
1313
- docker build -t aws/codebuild/dot-net:core-1 .
1414
- cd $CODEBUILD_SRC_DIR/ubuntu/dot-net/core-2
1515
- docker build -t aws/codebuild/dot-net:core-2 .
16+
- cd $CODEBUILD_SRC_DIR/ubuntu/dot-net/core-2.1
17+
- docker build -t aws/codebuild/dot-net:core-2.1 .
1618
- cd $CODEBUILD_SRC_DIR/ubuntu/golang/1.10
1719
- docker build -t aws/codebuild/golang:1.10 .
1820
- cd $CODEBUILD_SRC_DIR/ubuntu/java/openjdk-8

ubuntu/android-java-8/24.4.1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker
@@ -144,7 +144,7 @@ RUN set -ex \
144144
&& ln -s /usr/local/gradle-$GRADLE_VERSION/bin/gradle /usr/bin/gradle \
145145
&& rm -rf /usr/src/gradle \
146146
# Install Android SDK
147-
&& wget "http://dl.google.com/android/android-sdk_r$ANDROID_TOOLS_VER-linux.tgz" -O /tmp/android-sdk.tgz \
147+
&& wget "https://dl.google.com/android/android-sdk_r$ANDROID_TOOLS_VER-linux.tgz" -O /tmp/android-sdk.tgz \
148148
&& echo "${ANDROID_TOOLS_SHA1} /tmp/android-sdk.tgz" | sha1sum -c - \
149149
&& tar -xzf /tmp/android-sdk.tgz -C /usr/local/ \
150150
&& chown -R root.root $ANDROID_HOME \

ubuntu/android-java-8/26.1.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker

ubuntu/docker/17.09.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker

ubuntu/dot-net/core-1/Dockerfile

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker
@@ -102,23 +102,23 @@ RUN set -ex \
102102
&& apt-get update \
103103
&& apt-get install -y --no-install-recommends \
104104
libc6=2.19-* \
105-
libcurl3=7.35.0-* \
106-
libgcc1=1:4.9.3-* \
107-
libgssapi-krb5-2=1.12+dfsg-* \
105+
libcurl3=7.35.* \
106+
libgcc1=1:4.9.* \
107+
libgssapi-krb5-2=1.12* \
108108
libicu52=52.1-* \
109-
liblttng-ust0=2.4.0-* \
110-
libssl1.0.0=1.0.1f-* \
109+
liblttng-ust0=2.4.* \
110+
libssl1.0.0=1.0.* \
111111
libunwind8=1.1-* \
112-
libuuid1=2.20.1-* \
113-
zlib1g=1:1.2.8.dfsg-* \
114-
software-properties-common=0.92.37.8 \
112+
libuuid1=2.20.* \
113+
zlib1g=1:1.2.* \
114+
software-properties-common=0.92.* \
115115
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
116116
&& apt-get update \
117117
&& apt-get install -y libstdc++6=8*\
118118
&& rm -rf /var/lib/apt/lists/*
119119

120120
# Install .NET Core SDK
121-
ENV DOTNET_SDK_VERSION 1.0.4
121+
ENV DOTNET_SDK_VERSION 1.1.10
122122
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz
123123

124124
RUN set -ex \
@@ -137,3 +137,17 @@ RUN set -ex \
137137
&& cd .. \
138138
&& rm -rf warmup \
139139
&& rm -rf /tmp/NuGetScratch
140+
141+
# Install Powershell Core
142+
# See instructions at https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux
143+
ENV POWERSHELL_VERSION 6.0.3
144+
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.3/powershell-6.0.3-linux-x64.tar.gz
145+
ENV POWERSHELL_DOWNLOAD_SHA A43D3056688FABC442BFBE0FD7A096F7E28036759EFF9D6EBE8CB9155C9D9AAB
146+
147+
RUN set -ex \
148+
&& curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.tar.gz \
149+
&& echo "$POWERSHELL_DOWNLOAD_SHA powershell.tar.gz" | sha256sum -c - \
150+
&& mkdir -p /opt/microsoft/powershell/$POWERSHELL_VERSION \
151+
&& tar zxf powershell.tar.gz -C /opt/microsoft/powershell/$POWERSHELL_VERSION \
152+
&& rm powershell.tar.gz \
153+
&& ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh /usr/bin/pwsh

ubuntu/dot-net/core-2.1/Dockerfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker
@@ -118,9 +118,9 @@ RUN set -ex \
118118
&& rm -rf /var/lib/apt/lists/*
119119

120120
# Install .NET Core SDK
121-
ENV DOTNET_SDK_VERSION 2.1.300
121+
ENV DOTNET_SDK_VERSION 2.1.302
122122
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz
123-
ENV DOTNET_SDK_DOWNLOAD_SHA 80a6bfb1db5862804e90f819c1adeebe3d624eae0d6147e5d6694333f0458afd7d34ce73623964752971495a310ff7fcc266030ce5aef82d5de7293d94d13770
123+
ENV DOTNET_SDK_DOWNLOAD_SHA 2166986e360f1c3456a33723edb80349e6ede115be04a6331bfbfd0f412494684d174a0cfb21d2feb00d509ce342030160a4b5b445e393ad83bedb613a64bc66
124124

125125
RUN set -ex \
126126
&& curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
@@ -139,3 +139,17 @@ RUN set -ex \
139139
&& cd .. \
140140
&& rm -rf warmup \
141141
&& rm -rf /tmp/NuGetScratch
142+
143+
# Install Powershell Core
144+
# See instructions at https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux
145+
ENV POWERSHELL_VERSION 6.0.3
146+
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.3/powershell-6.0.3-linux-x64.tar.gz
147+
ENV POWERSHELL_DOWNLOAD_SHA A43D3056688FABC442BFBE0FD7A096F7E28036759EFF9D6EBE8CB9155C9D9AAB
148+
149+
RUN set -ex \
150+
&& curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.tar.gz \
151+
&& echo "$POWERSHELL_DOWNLOAD_SHA powershell.tar.gz" | sha256sum -c - \
152+
&& mkdir -p /opt/microsoft/powershell/$POWERSHELL_VERSION \
153+
&& tar zxf powershell.tar.gz -C /opt/microsoft/powershell/$POWERSHELL_VERSION \
154+
&& rm powershell.tar.gz \
155+
&& ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh /usr/bin/pwsh

ubuntu/dot-net/core-2/Dockerfile

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker
@@ -102,25 +102,25 @@ RUN set -ex \
102102
&& apt-get update \
103103
&& apt-get install -y --no-install-recommends \
104104
libc6=2.19-* \
105-
libcurl3=7.35.0-* \
106-
libgcc1=1:4.9.3-* \
107-
libgssapi-krb5-2=1.12+dfsg-* \
105+
libcurl3=7.35.* \
106+
libgcc1=1:4.9.* \
107+
libgssapi-krb5-2=1.12* \
108108
libicu52=52.1-* \
109-
liblttng-ust0=2.4.0-* \
110-
libssl1.0.0=1.0.1f-* \
109+
liblttng-ust0=2.4.* \
110+
libssl1.0.0=1.0.* \
111111
libunwind8=1.1-* \
112-
libuuid1=2.20.1-* \
113-
zlib1g=1:1.2.8.dfsg-* \
114-
software-properties-common=0.92.37.8 \
112+
libuuid1=2.20.* \
113+
zlib1g=1:1.2.* \
114+
software-properties-common=0.92.* \
115115
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
116116
&& apt-get update \
117117
&& apt-get install -y libstdc++6=8*\
118118
&& rm -rf /var/lib/apt/lists/*
119119

120120
# Install .NET Core SDK
121-
ENV DOTNET_SDK_VERSION 2.1.101
121+
ENV DOTNET_SDK_VERSION 2.1.202
122122
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz
123-
ENV DOTNET_SDK_DOWNLOAD_SHA d231ac3562f025b848497eddbcb254cfd547bd622b35dc4b1ed5bcd29153f832610b77cf7edf15d9f05c707d4d06abecbdcd7633fa721246d6d7ba61d78eea81
123+
ENV DOTNET_SDK_DOWNLOAD_SHA e785b9b488b5570708eb060f9a4cb5cf94597d99a8b0a3ee449d2e5df83771c1ba643a87db17ae6727d0e2acb401eca292fb8c68ad92eeb59d7f0d75eab1c20a
124124

125125
RUN set -ex \
126126
&& curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
@@ -139,3 +139,18 @@ RUN set -ex \
139139
&& cd .. \
140140
&& rm -rf warmup \
141141
&& rm -rf /tmp/NuGetScratch
142+
143+
# Install Powershell Core
144+
# See instructions at https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux
145+
ENV POWERSHELL_VERSION 6.0.3
146+
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.3/powershell-6.0.3-linux-x64.tar.gz
147+
ENV POWERSHELL_DOWNLOAD_SHA A43D3056688FABC442BFBE0FD7A096F7E28036759EFF9D6EBE8CB9155C9D9AAB
148+
149+
RUN set -ex \
150+
&& curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.tar.gz \
151+
&& echo "$POWERSHELL_DOWNLOAD_SHA powershell.tar.gz" | sha256sum -c - \
152+
&& mkdir -p /opt/microsoft/powershell/$POWERSHELL_VERSION \
153+
&& tar zxf powershell.tar.gz -C /opt/microsoft/powershell/$POWERSHELL_VERSION \
154+
&& rm powershell.tar.gz \
155+
&& ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh /usr/bin/pwsh
156+

ubuntu/golang/1.10/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker

ubuntu/java/openjdk-8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
6464
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
6565
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
66-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe /output json /showvariable \$1" >> /usr/local/bin/gitversion \
66+
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
6767
&& chmod +x /usr/local/bin/gitversion
6868

6969
# Install Docker

0 commit comments

Comments
 (0)