Skip to content

Commit 3afcecb

Browse files
authored
Update dotnet docker images to .NET 7 and enable dynamic PGO (#321)
* Update dotnet docker images to .NET 7 and enable dynamic PGO * Update
1 parent a07e3f7 commit 3afcecb

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

containers/init/build/dotnet/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim
15+
FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim
1616

1717
RUN mkdir -p /src/workspace
1818
WORKDIR /src/workspace

containers/pre_built_workers/dotnet/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim
15+
FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim
1616

1717
RUN mkdir -p /pre
1818
WORKDIR /pre
@@ -40,7 +40,13 @@ RUN dotnet publish -c Release -o qps_worker perf/benchmarkapps/QpsWorker/
4040

4141
# Note that the QpsWorker built by "dotnet publish" in the previous step needs to be runnable
4242
# with the runtime image below.
43-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
43+
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim
44+
45+
# Enable dynamic profile-guided optimization
46+
# https://gist.github.com/EgorBo/dc181796683da3d905a5295bfd3dd95b
47+
ENV DOTNET_ReadyToRun=0
48+
ENV DOTNET_TieredPGO=1
49+
ENV DOTNET_TC_QuickJitForLoops=1
4450

4551
RUN mkdir -p /execute
4652
WORKDIR /execute

containers/runtime/dotnet/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
15+
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim
1616

1717
RUN mkdir -p /src/workspace
1818
WORKDIR /src/workspace

0 commit comments

Comments
 (0)