Compare commits
3 Commits
626ab99888
...
e82d198ee7
| Author | SHA1 | Date | |
|---|---|---|---|
| e82d198ee7 | |||
| 4c6a9e6dec | |||
| feb1326cee |
24
AS1024.GeoFeed.MinimalAPI/Dockerfile.bare-image
Normal file
24
AS1024.GeoFeed.MinimalAPI/Dockerfile.bare-image
Normal file
@@ -0,0 +1,24 @@
|
||||
#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/sdk:8.0-alpine AS build
|
||||
# Install clang/zlib1g-dev dependencies for publishing to native
|
||||
RUN apk add clang zlib-static zlib-dev musl-dev libc6-compat cmake autoconf make openssl-dev openssl-libs-static icu-static icu-dev
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["AS1024.GeoFeed.MinimalAPI/AS1024.GeoFeed.MinimalAPI.csproj", "AS1024.GeoFeed.MinimalAPI/"]
|
||||
RUN dotnet restore "./AS1024.GeoFeed.MinimalAPI/./AS1024.GeoFeed.MinimalAPI.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/AS1024.GeoFeed.MinimalAPI"
|
||||
RUN dotnet build "./AS1024.GeoFeed.MinimalAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./AS1024.GeoFeed.MinimalAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish -r linux-musl-x64 /p:StaticOpenSslLinking=true /p:StaticExecutable=true /p:StaticallyLinked=true /p:StripSymbols=true /p:DebugType=None /p:DebugSymbols=false
|
||||
|
||||
FROM scratch AS final
|
||||
WORKDIR /tmp
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
COPY --from=publish /app/publish .
|
||||
COPY --from=build /etc/ssl/certs/* /etc/ssl/certs/
|
||||
ENTRYPOINT ["./AS1024.GeoFeed.MinimalAPI"]
|
||||
Reference in New Issue
Block a user