mirror of
https://github.com/Sandoun/DynDNSv2.git
synced 2025-12-06 02:41:24 +00:00
Fix
This commit is contained in:
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: ${{ github.workspace }}/src
|
context: ${{ github.workspace }}/src
|
||||||
file: ${{ github.workspace }}/src/DynDNSv2/Dockerfile
|
file: ${{ github.workspace }}/src/DynDNSv2/MultiBuild.Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
<!--<ContainerFamily>alpine</ContainerFamily>-->
|
||||||
<UserSecretsId>abe55787-bc11-416d-85aa-eaf544f21fe1</UserSecretsId>
|
<UserSecretsId>abe55787-bc11-416d-85aa-eaf544f21fe1</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
21
src/DynDNSv2/MultiBuild.Dockerfile
Normal file
21
src/DynDNSv2/MultiBuild.Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Learn about building .NET container images:
|
||||||
|
# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
|
||||||
|
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
|
||||||
|
ARG TARGETARCH
|
||||||
|
WORKDIR /source
|
||||||
|
|
||||||
|
# copy csproj and restore as distinct layers
|
||||||
|
COPY ./DynDNSv2/DynDNSv2.csproj .
|
||||||
|
RUN dotnet restore -a $TARGETARCH
|
||||||
|
|
||||||
|
# copy and publish app and libraries
|
||||||
|
COPY ./DynDNSv2/. .
|
||||||
|
RUN dotnet publish --no-restore -a $TARGETARCH -o /app
|
||||||
|
|
||||||
|
# Enable globalization and time zones:
|
||||||
|
# https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md
|
||||||
|
# final stage/image
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app .
|
||||||
|
ENTRYPOINT ["./DynDNSv2"]
|
||||||
Reference in New Issue
Block a user