mirror of
https://github.com/Sandoun/DynDNSv2.git
synced 2025-12-06 02:41:24 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a0a1e1909 | ||
|
|
5e247498ce | ||
|
|
90bde5fd5f | ||
|
|
7a75abf056 | ||
|
|
2d01fddf68 | ||
|
|
4f9d607509 |
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
@@ -15,6 +15,12 @@ jobs:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -33,7 +39,8 @@ jobs:
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ${{ github.workspace }}/src
|
||||
file: ${{ github.workspace }}/src/DynDNSv2/Dockerfile
|
||||
file: ${{ github.workspace }}/src/DynDNSv2/MultiBuild.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<!--<ContainerFamily>alpine</ContainerFamily>-->
|
||||
<UserSecretsId>abe55787-bc11-416d-85aa-eaf544f21fe1</UserSecretsId>
|
||||
</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