Skip to content

Commit

Permalink
refactor(docker): switch to Alpine images for efficiency (#313)
Browse files Browse the repository at this point in the history
Replace the base and build images in Dockerfiles their 
Alpine counterparts to reduce image size and improve 
performance. This change enhances the overall efficiency 
of the containerized applications.
  • Loading branch information
GordonBeeming authored Nov 13, 2024
1 parent de3ddca commit d077fc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/GordonBeemingCom.Editor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV BRANCH_NAME=$A_BRANCH_NAME
RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /src
COPY ["global.json", "GordonBeemingCom.Editor/global.json"]
COPY ["Directory.*.props", "./"]
Expand Down
4 changes: 2 additions & 2 deletions src/GordonBeemingCom/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS base
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80
Expand All @@ -11,7 +11,7 @@ ENV BRANCH_NAME=$A_BRANCH_NAME
RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /src
COPY ["global.json", "GordonBeemingCom/global.json"]
COPY ["Directory.*.props", "./"]
Expand Down

0 comments on commit d077fc6

Please sign in to comment.