forked from dotnet/dotnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dotnet#69 from dotnet/dev
Merge dev into master for 1.0.0 release
- Loading branch information
Showing
21 changed files
with
338 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM buildpack-deps:jessie-scm | ||
|
||
# Work around https://github.com/dotnet/cli/issues/1582 until Docker releases a | ||
# fix (https://github.com/docker/docker/issues/20818). This workaround allows | ||
# the container to be run with the default seccomp Docker settings by avoiding | ||
# the restart_syscall made by LTTng which causes a failed assertion. | ||
ENV LTTNG_UST_REGISTER_TIMEOUT 0 | ||
|
||
# Install .NET CLI dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libc6 \ | ||
libcurl3 \ | ||
libgcc1 \ | ||
libgssapi-krb5-2 \ | ||
libicu52 \ | ||
liblttng-ust0 \ | ||
libssl1.0.0 \ | ||
libstdc++6 \ | ||
libunwind8 \ | ||
libuuid1 \ | ||
zlib1g \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_SDK_VERSION 1.0.0-preview2-003121 | ||
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz | ||
|
||
RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ | ||
&& rm dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | ||
|
||
# Trigger the population of the local package cache | ||
ENV NUGET_XMLDOC_MODE skip | ||
RUN mkdir warmup \ | ||
&& cd warmup \ | ||
&& dotnet new \ | ||
&& cd .. \ | ||
&& rm -rf warmup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Building dependent onbuild image" | ||
docker build --rm --force-rm -t onbuild onbuild/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Issue - https://github.com/docker/hub-feedback/issues/384#issuecomment-214508878 | ||
# Docker Hub emits an invalid .dockercfg. Remove the outer auths element. | ||
if [[ $DOCKERCFG == {\"auths\":* ]]; then | ||
jsonStartIndex=$(expr index "$DOCKERCFG" :) | ||
length=$((${#DOCKERCFG} - $jsonStartIndex - 1)) | ||
echo ${DOCKERCFG:jsonStartIndex:length} > /root/.dockercfg | ||
fi | ||
|
||
|
||
echo "Pushing latest image" | ||
tagStartIndex=$(expr index "$IMAGE_NAME" :) | ||
repoName=${IMAGE_NAME:0:tagStartIndex - 1} | ||
latestImageName=$repoName":latest" | ||
docker tag $IMAGE_NAME $latestImageName | ||
docker push $latestImageName | ||
|
||
|
||
echo "Pushing onbuild images" | ||
versionedImageName=$repoName":1.0.0-preview2-onbuild" | ||
docker tag onbuild $versionedImageName | ||
docker push $versionedImageName | ||
|
||
latestImageName=$repoName":onbuild" | ||
docker tag onbuild $latestImageName | ||
docker push $latestImageName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM microsoft/dotnet:1.0.0-preview2-sdk | ||
|
||
RUN mkdir -p /dotnetapp | ||
WORKDIR /dotnetapp | ||
|
||
ENTRYPOINT ["dotnet", "run"] | ||
|
||
ONBUILD COPY . /dotnetapp | ||
ONBUILD RUN dotnet restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM nanoserver | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_SDK_VERSION 1.0.0-preview2-003121 | ||
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_SDK_VERSION/dotnet-dev-win-x64.$DOTNET_SDK_VERSION.zip | ||
|
||
RUN powershell -NoProfile -Command \ | ||
$ErrorActionPreference = 'Stop'; \ | ||
$httpClient = New-Object System.Net.Http.HttpClient; \ | ||
$stream = $httpClient.GetAsync('%DOTNET_SDK_DOWNLOAD_URL%').Result.Content.ReadAsStreamAsync().Result; \ | ||
$file = [System.IO.File]::Create('dotnet.zip'); \ | ||
$stream.CopyTo($file); \ | ||
$file.Close(); \ | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory('dotnet.zip', '%ProgramFiles%\dotnet'); \ | ||
Remove-Item -Force dotnet.zip | ||
|
||
RUN setx /M PATH "%PATH%;%ProgramFiles%\dotnet" | ||
|
||
# Copy forwarders assemblies to workaround | ||
# https://github.com/dotnet/cli/blob/rel/1.0.0-preview2/Documentation/known-issues.md#running-net-core-cli-on-nano-server | ||
RUN copy "%windir%\System32\forwarders\*" "%ProgramFiles%\dotnet\shared\Microsoft.NETCore.App\1.0.0\" | ||
# Trigger the population of the local package cache | ||
ENV NUGET_XMLDOC_MODE skip | ||
RUN mkdir warmup \ | ||
&& cd warmup \ | ||
&& dotnet new \ | ||
&& cd .. \ | ||
&& rmdir /q/s warmup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM microsoft/dotnet:1.0.0-preview2-nanoserver-sdk | ||
|
||
RUN mkdir dotnetapp | ||
WORKDIR dotnetapp | ||
|
||
ENTRYPOINT ["dotnet", "run"] | ||
|
||
ONBUILD COPY . . | ||
ONBUILD RUN dotnet restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM windowsservercore | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_SDK_VERSION 1.0.0-preview2-003121 | ||
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_SDK_VERSION/dotnet-dev-win-x64.$DOTNET_SDK_VERSION.zip | ||
|
||
RUN powershell -NoProfile -Command \ | ||
$ErrorActionPreference = 'Stop'; \ | ||
Invoke-WebRequest %DOTNET_SDK_DOWNLOAD_URL% -OutFile dotnet.zip; \ | ||
Expand-Archive dotnet.zip -DestinationPath '%ProgramFiles%\dotnet'; \ | ||
Remove-Item -Force dotnet.zip | ||
|
||
RUN setx /M PATH "%PATH%;%ProgramFiles%\dotnet" | ||
|
||
# Trigger the population of the local package cache | ||
ENV NUGET_XMLDOC_MODE skip | ||
RUN mkdir warmup \ | ||
&& cd warmup \ | ||
&& dotnet new \ | ||
&& cd .. \ | ||
&& rmdir /q/s warmup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM microsoft/dotnet:1.0.0-preview2-windowsservercore-sdk | ||
|
||
RUN mkdir dotnetapp | ||
WORKDIR dotnetapp | ||
|
||
ENTRYPOINT ["dotnet", "run"] | ||
|
||
ONBUILD COPY . . | ||
ONBUILD RUN dotnet restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM debian:jessie | ||
|
||
# Install .NET Core dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libc6 \ | ||
libcurl3 \ | ||
libgcc1 \ | ||
libgssapi-krb5-2 \ | ||
libicu52 \ | ||
liblttng-ust0 \ | ||
libssl1.0.0 \ | ||
libstdc++6 \ | ||
libunwind8 \ | ||
libuuid1 \ | ||
zlib1g \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Building dependent care image" | ||
docker build --rm --force-rm -t core ../core/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Issue - https://github.com/docker/hub-feedback/issues/384#issuecomment-214508878 | ||
# Docker Hub emits an invalid .dockercfg. Remove the outer auths element. | ||
if [[ $DOCKERCFG == {\"auths\":* ]]; then | ||
jsonStartIndex=$(expr index "$DOCKERCFG" :) | ||
length=$((${#DOCKERCFG} - $jsonStartIndex - 1)) | ||
echo ${DOCKERCFG:jsonStartIndex:length} > /root/.dockercfg | ||
fi | ||
|
||
|
||
echo "Pushing latest core-deps image" | ||
tagStartIndex=$(expr index "$IMAGE_NAME" :) | ||
repoName=${IMAGE_NAME:0:tagStartIndex - 1} | ||
latestImageName=$repoName":core-deps" | ||
docker tag $IMAGE_NAME $latestImageName | ||
docker push $latestImageName | ||
|
||
|
||
echo "Pushing core images" | ||
versionedImageName=$repoName":1.0.0-core" | ||
docker tag core $versionedImageName | ||
docker push $versionedImageName | ||
|
||
latestImageName=$repoName":core" | ||
docker tag core $latestImageName | ||
docker push $latestImageName | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM microsoft/dotnet:1.0.0-core-deps | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 1.0.0 | ||
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_VERSION/dotnet-debian-x64.$DOTNET_VERSION.tar.gz | ||
|
||
RUN curl -SL $DOTNET_DOWNLOAD_URL --output dotnet.tar.gz \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ | ||
&& rm dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM nanoserver | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 1.0.0 | ||
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_VERSION/dotnet-win-x64.$DOTNET_VERSION.zip | ||
|
||
RUN powershell -NoProfile -Command \ | ||
$ErrorActionPreference = 'Stop'; \ | ||
$httpClient = New-Object System.Net.Http.HttpClient; \ | ||
$stream = $httpClient.GetAsync('%DOTNET_DOWNLOAD_URL%').Result.Content.ReadAsStreamAsync().Result; \ | ||
$file = [System.IO.File]::Create('dotnet.zip'); \ | ||
$stream.CopyTo($file); \ | ||
$file.Close(); \ | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory('dotnet.zip', '%ProgramFiles%\dotnet'); \ | ||
Remove-Item -Force dotnet.zip | ||
|
||
RUN setx /M PATH "%PATH%;%ProgramFiles%\dotnet" | ||
|
||
# Copy forwarders assemblies to workaround | ||
# https://github.com/dotnet/cli/blob/rel/1.0.0-preview2/Documentation/known-issues.md#running-net-core-cli-on-nano-server | ||
RUN copy "%windir%\System32\forwarders\*" "%ProgramFiles%\dotnet\shared\Microsoft.NETCore.App\1.0.0\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM windowsservercore | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 1.0.0 | ||
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$DOTNET_VERSION/dotnet-win-x64.$DOTNET_VERSION.zip | ||
|
||
RUN powershell -NoProfile -Command \ | ||
$ErrorActionPreference = 'Stop'; \ | ||
Invoke-WebRequest %DOTNET_DOWNLOAD_URL% -OutFile dotnet.zip; \ | ||
Expand-Archive dotnet.zip -DestinationPath '%ProgramFiles%\dotnet'; \ | ||
Remove-Item -Force dotnet.zip | ||
|
||
RUN setx /M PATH "%PATH%;%ProgramFiles%\dotnet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0-rc2/README.md | ||
1.0.0/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
REM Interim script to assist in building Windows images until Docker Hub auto builds support Windows | ||
|
||
Set DOTNET_SDK_VERSION=1.0.0-preview2 | ||
Set DOTNET_VERSION=1.0.0 | ||
|
||
IF NOT DEFINED REPO_OWNER ( | ||
set REPO_OWNER=microsoft | ||
) | ||
|
||
IF DEFINED NANO_SERVER ( | ||
pushd %DOTNET_SDK_VERSION%\nanoserver | ||
docker build -t %REPO_OWNER%/dotnet:nanoserver . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:nanoserver %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-sdk || goto :error | ||
popd | ||
|
||
pushd %DOTNET_SDK_VERSION%\nanoserver\onbuild | ||
docker build -t %REPO_OWNER%/dotnet:nanoserver-onbuild . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:nanoserver-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-onbuild || goto :error | ||
popd | ||
|
||
pushd %DOTNET_VERSION%\nanoserver\core | ||
docker build -t %REPO_OWNER%/dotnet:nanoserver-core . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:nanoserver-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-nanoserver-core || goto :error | ||
popd | ||
) ELSE ( | ||
pushd %DOTNET_SDK_VERSION%\windowsservercore | ||
docker build -t %REPO_OWNER%/dotnet:windowsservercore . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:windowsservercore %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-sdk || goto :error | ||
popd | ||
|
||
pushd %DOTNET_SDK_VERSION%\windowsservercore\onbuild | ||
docker build -t %REPO_OWNER%/dotnet:windowsservercore-onbuild . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:windowsservercore-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-onbuild || goto :error | ||
popd | ||
|
||
pushd %DOTNET_VERSION%\windowsservercore\core | ||
docker build -t %REPO_OWNER%/dotnet:windowsservercore-core . || goto :error | ||
docker tag %REPO_OWNER%/dotnet:windowsservercore-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-windowsservercore-core || goto :error | ||
popd | ||
|
||
goto :EOF | ||
|
||
:error | ||
popd | ||
exit /B 1 |
Oops, something went wrong.