Skip to content
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

Wali/dotnet test release with public binaires to private mcr #2183

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/__dotNetCoreRunTimeVersions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.

DOT_NET_CORE_RUNTIME_BASE_TAG='20230930.2'
DOT_NET_CORE_RUNTIME_BASE_TAG='20231006.1'
NET_CORE_APP_10='1.0.16'
NET_CORE_APP_11='1.1.13'
NET_CORE_APP_20='2.0.9'
Expand Down
2 changes: 1 addition & 1 deletion build/__stagingRuntimeConstants.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was auto-generated from 'constants.yaml'. Changes may be overridden.

DOTNETCORE_STAGING_RUNTIME_VERSIONS=("")
DOTNETCORE_STAGING_RUNTIME_VERSIONS=("6.0" "7.0" "8.0")
PYTHON_STAGING_RUNTIME_VERSIONS=("")
NODE_STAGING_RUNTIME_VERSIONS=("")
JAVA_STAGING_RUNTIME_VERSIONS=("")
Expand Down
6 changes: 4 additions & 2 deletions build/constants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
file-name-prefix: __
- name: dot-net-core-run-time-versions
constants:
dot-net-core-runtime-base-tag: 20230930.2
dot-net-core-runtime-base-tag: 20231006.1
net-core-app-10: 1.0.16
net-core-app-11: 1.1.13
net-core-app-20: 2.0.9
Expand Down Expand Up @@ -473,7 +473,9 @@
- name: staging-runtime-constants
constants:
dotnetcore-staging-runtime-versions:
-
- 6.0
- 7.0
- 8.0
python-staging-runtime-versions:
-
node-staging-runtime-versions:
Expand Down
67 changes: 67 additions & 0 deletions images/runtime/dotnetcore/6.0/base.bullseye.staging.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax=docker/dockerfile:1.3
# the above line allows this dockerfile to use the secrets fucntionality

# dotnet tools are currently available as part of SDK so we need to create them in an sdk image
# and copy them to our final runtime image
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS tools-install
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-monitor --version 6.*

FROM mcr.microsoft.com/mirror/docker/library/debian:buster-slim
ARG BUILD_DIR=/tmp/oryx/build
ADD build ${BUILD_DIR}

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu63 \
libssl1.1 \
libstdc++6 \
zlib1g \
lldb \
curl \
file \
libgdiplus \
&& apt-get upgrade --assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
PATH="/opt/dotnetcore-tools:${PATH}"

COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools

# Install .NET Core
# mount the secret sas token to pull the binaries, and make sure we do not print to docker build logs
RUN --mount=type=secret,id=dotnet_storage_account_token_id \
set -e \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
&& apt-get remove ca-certificates -y \
&& apt-get purge ca-certificates -y \
&& apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \
&& 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 \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz \
&& dotnet-sos install \
&& rm -rf ${BUILD_DIR}
67 changes: 67 additions & 0 deletions images/runtime/dotnetcore/6.0/base.buster.staging.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax=docker/dockerfile:1.3
# the above line allows this dockerfile to use the secrets fucntionality

# dotnet tools are currently available as part of SDK so we need to create them in an sdk image
# and copy them to our final runtime image
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS tools-install
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-monitor --version 6.*

FROM mcr.microsoft.com/mirror/docker/library/debian:buster-slim
ARG BUILD_DIR=/tmp/oryx/build
ADD build ${BUILD_DIR}

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu63 \
libssl1.1 \
libstdc++6 \
zlib1g \
lldb \
curl \
file \
libgdiplus \
&& apt-get upgrade --assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
PATH="/opt/dotnetcore-tools:${PATH}"

COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools

# Install .NET Core
# mount the secret sas token to pull the binaries, and make sure we do not print to docker build logs
RUN --mount=type=secret,id=dotnet_storage_account_token_id \
set -e \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
&& apt-get remove ca-certificates -y \
&& apt-get purge ca-certificates -y \
&& apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_60/dotnet-runtime-$NET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_60_SHA dotnet.tar.gz" | sha512sum -c - \
&& 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 \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_60/aspnetcore-runtime-$ASPNET_CORE_APP_60-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_60_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz \
&& dotnet-sos install \
&& rm -rf ${BUILD_DIR}
67 changes: 67 additions & 0 deletions images/runtime/dotnetcore/7.0/base.bullseye.staging.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax=docker/dockerfile:1.3
# the above line allows this dockerfile to use the secrets fucntionality

# dotnet tools are currently available as part of SDK so we need to create them in an sdk image
# and copy them to our final runtime image
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS tools-install
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-monitor --version 6.*

FROM mcr.microsoft.com/mirror/docker/library/debian:buster-slim
ARG BUILD_DIR=/tmp/oryx/build
ADD build ${BUILD_DIR}

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu63 \
libssl1.1 \
libstdc++6 \
zlib1g \
lldb \
curl \
file \
libgdiplus \
&& apt-get upgrade --assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
PATH="/opt/dotnetcore-tools:${PATH}"

COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools

# Install .NET Core
# mount the secret sas token to pull the binaries, and make sure we do not print to docker build logs
RUN --mount=type=secret,id=dotnet_storage_account_token_id \
set -e \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
&& apt-get remove ca-certificates -y \
&& apt-get purge ca-certificates -y \
&& apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \
&& 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 \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz \
&& dotnet-sos install \
&& rm -rf ${BUILD_DIR}
67 changes: 67 additions & 0 deletions images/runtime/dotnetcore/7.0/base.buster.staging.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax=docker/dockerfile:1.3
# the above line allows this dockerfile to use the secrets fucntionality

# dotnet tools are currently available as part of SDK so we need to create them in an sdk image
# and copy them to our final runtime image
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS tools-install
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-monitor --version 6.*

FROM mcr.microsoft.com/mirror/docker/library/debian:buster-slim
ARG BUILD_DIR=/tmp/oryx/build
ADD build ${BUILD_DIR}

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu63 \
libssl1.1 \
libstdc++6 \
zlib1g \
lldb \
curl \
file \
libgdiplus \
&& apt-get upgrade --assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
PATH="/opt/dotnetcore-tools:${PATH}"

COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools

# Install .NET Core
# mount the secret sas token to pull the binaries, and make sure we do not print to docker build logs
RUN --mount=type=secret,id=dotnet_storage_account_token_id \
set -e \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
&& apt-get remove ca-certificates -y \
&& apt-get purge ca-certificates -y \
&& apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_70/dotnet-runtime-$NET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_70_SHA dotnet.tar.gz" | sha512sum -c - \
&& 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 \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_70/aspnetcore-runtime-$ASPNET_CORE_APP_70-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_70_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz \
&& dotnet-sos install \
&& rm -rf ${BUILD_DIR}
67 changes: 67 additions & 0 deletions images/runtime/dotnetcore/8.0/base.bookworm.staging.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax=docker/dockerfile:1.3
# the above line allows this dockerfile to use the secrets fucntionality

# dotnet tools are currently available as part of SDK so we need to create them in an sdk image
# and copy them to our final runtime image
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS tools-install
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-monitor --version 6.*

FROM mcr.microsoft.com/mirror/docker/library/debian:buster-slim
ARG BUILD_DIR=/tmp/oryx/build
ADD build ${BUILD_DIR}

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu63 \
daniv-msft marked this conversation as resolved.
Show resolved Hide resolved
libssl1.1 \
libstdc++6 \
zlib1g \
lldb \
curl \
file \
libgdiplus \
&& apt-get upgrade --assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Configure web servers to bind to port 80 when present
ENV ASPNETCORE_URLS=http://+:80 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
PATH="/opt/dotnetcore-tools:${PATH}"

COPY --from=tools-install /dotnetcore-tools /opt/dotnetcore-tools

# Install .NET Core
# mount the secret sas token to pull the binaries, and make sure we do not print to docker build logs
RUN --mount=type=secret,id=dotnet_storage_account_token_id \
set -e \
# based on resolution on https://github.com/NuGet/Announcements/issues/49#issue-795386700
&& apt-get remove ca-certificates -y \
&& apt-get purge ca-certificates -y \
&& apt-get update \
&& apt-get install -f ca-certificates=20200601~deb10u2 -y --no-install-recommends \
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$NET_CORE_APP_80/dotnet-runtime-$NET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$NET_CORE_APP_80_SHA dotnet.tar.gz" | sha512sum -c - \
&& 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 \
# Install ASP.NET Core
&& . ${BUILD_DIR}/__dotNetCoreRunTimeVersions.sh \
&& curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_CORE_APP_80/aspnetcore-runtime-$ASPNET_CORE_APP_80-linux-x64.tar.gz \
&& echo "$ASPNET_CORE_APP_80_SHA aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz \
&& dotnet-sos install \
&& rm -rf ${BUILD_DIR}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.DotNetCore
{
public static class DotNetCoreRunTimeVersions
{
public const string DotNetCoreRuntimeBaseTag = "20230930.2";
public const string DotNetCoreRuntimeBaseTag = "20231006.1";
public const string NetCoreApp10 = "1.0.16";
public const string NetCoreApp11 = "1.1.13";
public const string NetCoreApp20 = "2.0.9";
Expand Down
2 changes: 1 addition & 1 deletion src/BuildScriptGenerator/StagingRuntimeConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
{
public static class StagingRuntimeConstants
{
public static readonly List<string> DotnetcoreStagingRuntimeVersions = new List<string> { };
public static readonly List<string> DotnetcoreStagingRuntimeVersions = new List<string> { "6.0", "7.0", "8.0" };
public static readonly List<string> PythonStagingRuntimeVersions = new List<string> { };
public static readonly List<string> NodeStagingRuntimeVersions = new List<string> { };
public static readonly List<string> JavaStagingRuntimeVersions = new List<string> { };
Expand Down