-
Notifications
You must be signed in to change notification settings - Fork 2k
Added preview1/rc2 images for .NET Core and CLI Tools. #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,35 @@ | ||
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 echo "deb [arch=amd64] http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main" > /etc/apt/sources.list.d/llvm.list \ | ||
&& wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key|apt-key add - \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
clang-3.5 \ | ||
libc6 \ | ||
libcurl3 \ | ||
libgcc1 \ | ||
libicu52 \ | ||
liblldb-3.6 \ | ||
liblttng-ust0 \ | ||
libssl1.0.0 \ | ||
libstdc++6 \ | ||
libtinfo5 \ | ||
libunwind8 \ | ||
libuuid1 \ | ||
zlib1g \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_CORE_SDK_VERSION 1.0.0-preview1-002702 | ||
RUN curl -SL https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/$DOTNET_CORE_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_CORE_SDK_VERSION.tar.gz --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 hidden or 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 @@ | ||
../1.0.0-rc2/README.md |
This file contains hidden or 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 hidden or 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-preview1-onbuild" | ||
docker tag onbuild $versionedImageName | ||
docker push $versionedImageName | ||
|
||
latestImageName=$repoName":onbuild" | ||
docker tag onbuild $latestImageName | ||
docker push $latestImageName |
This file contains hidden or 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-preview1 | ||
|
||
RUN mkdir -p /dotnetapp | ||
WORKDIR /dotnetapp | ||
|
||
ENTRYPOINT ["dotnet", "run"] | ||
|
||
ONBUILD COPY . /dotnetapp | ||
ONBUILD RUN dotnet restore |
This file contains hidden or 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,60 @@ | ||
 | ||
|
||
.NET Core Docker Image | ||
==================== | ||
|
||
This repository contains `Dockerfile` definitions for [dotnet/cli](https://github.com/dotnet/cli) Docker images. | ||
|
||
This project is part of .NET Core command-line (CLI) tools. You can find samples, documentation, and getting started instructions for .NET Core CLI tools on our [getting started](http://dotnet.github.io/getting-started/) page. | ||
|
||
[](https://registry.hub.docker.com/u/microsoft/dotnet) | ||
[](https://registry.hub.docker.com/u/microsoft/dotnet) | ||
|
||
|
||
## Supported tags | ||
|
||
### Development images | ||
- [`0.0.1-alpha`, (*0.0.1-alpha/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/0.0.1-alpha/Dockerfile) | ||
- [`0.0.1-alpha-onbuild`, (*0.0.1-alpha/onbuild/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/0.0.1-alpha/onbuild/Dockerfile) | ||
- [`1.0.0-preview1`, `latest` (*1.0.0-preview1/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/1.0.0-preview1/Dockerfile) | ||
- [`1.0.0-preview1-onbuild`, `onbuild` (*1.0.0-preview1/onbuild/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/1.0.0-preview1/onbuild/Dockerfile) | ||
|
||
### Runtime images | ||
- [`1.0.0-rc2-core-deps`, `core-deps` (*1.0.0-rc2/core-deps/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/1.0.0-rc2/core-deps/Dockerfile) | ||
- [`1.0.0-rc2-core`, `core` (*1.0.0-rc2/core/Dockerfile*)](https://github.com/dotnet/dotnet-docker/blob/master/1.0.0-rc2/core/Dockerfile) | ||
|
||
## Image variants | ||
|
||
The `microsoft/dotnet` image come in different flavors, each designed for a specific use case. | ||
|
||
### `microsoft/dotnet:<version>` | ||
|
||
This is the defacto image. It contains the .NET Core runtime and framework as well as CLI tools. This image can be used to develop .NET Core applications as well as a place to run, test, and debug them. | ||
|
||
### `microsoft/dotnet:<version>-onbuild` | ||
|
||
The most straightforward way to use this image is to use a .NET container as both the build and runtime environment. In your `Dockerfile`, writing something along the lines of the following will compile and run your project: | ||
|
||
```dockerfile | ||
FROM microsoft/dotnet:onbuild | ||
``` | ||
|
||
This image includes multiple `ONBUILD` triggers which should cover most applications. The build will `COPY . /dotnetapp` and `RUN dotnet restore`. | ||
|
||
This image also includes the `ENTRYPOINT dotnet run` instruction which will run your application when the Docker image is run. | ||
|
||
You can then build and run the Docker image: | ||
|
||
```console | ||
$ docker build -t my-dotnet-app . | ||
$ docker run -it --rm --name my-running-app my-dotnet-app | ||
``` | ||
|
||
### `microsoft/dotnet:<version>-core-deps` | ||
|
||
This is an images that contains the prerequisites necessary to run a standalone .NET Core application. | ||
|
||
### `microsoft/dotnet:<version>-core` | ||
|
||
This is an image that contain the .NET Core runtime and framework that can used to run a .NET Core application. | ||
|
This file contains hidden or 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 \ | ||
libicu52 \ | ||
liblttng-ust0 \ | ||
libssl1.0.0 \ | ||
libstdc++6 \ | ||
libtinfo5 \ | ||
libunwind8 \ | ||
libuuid1 \ | ||
zlib1g \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains hidden or 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 hidden or 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-rc2-core" | ||
docker tag core $versionedImageName | ||
docker push $versionedImageName | ||
|
||
latestImageName=$repoName":core" | ||
docker tag core $latestImageName | ||
docker push $latestImageName | ||
|
This file contains hidden or 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,15 @@ | ||
FROM microsoft/dotnet:1.0.0-rc2-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_CORE_VERSION 1.0.0-rc2-3002702 | ||
RUN curl -SL https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/$DOTNET_CORE_VERSION/dotnet-debian-x64.$DOTNET_CORE_VERSION.tar.gz --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 hidden or 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 @@ | ||
0.0.1-alpha/README.md | ||
1.0.0-rc2/README.md |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be thinking of
onbuild
based off of:core
instead? WithENTRYPOINT ["dotnet"]
users would build in their publish output folder and run their (portable) app withdocker run microsoft/dotnet:onbuild myapp.dll
it's more lightweight and I'm not sure whether the typical onbuild scenario needs the full sdk.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dleeapho I am not sure I am following? onbuild as defined has to have the full sdk in order to restore and build. Where/when do you see this happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I positing that there is another scenario for onbuild, instead of restoring and building in-container that onbuild could also be used to quickly run any portable app. The onbuild would copy the
dotnet publish
directory contents andmyapp.dll
would be the args to thedotnet
(muxer) entrypoint. In any case we can wait and see if there is a need for what I'm proposing.