From 001711487cbdb53daf1955fab2e24d610d5d45cf Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Tue, 15 Apr 2025 15:18:37 +0200 Subject: [PATCH] fix: improve Docker build refs NOISSUE --- .gitea/workflows/release.yml | 2 +- song_of_the_day/Dockerfile => Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename song_of_the_day/Dockerfile => Dockerfile (67%) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e3508e2..5869fcc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -61,5 +61,5 @@ jobs: run: | REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]') REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') - docker build -t "git.disi.dev/$REPOSITORY_OWNER/song-of-the-day:$(cat $REPOSITORY_NAME/VERSION)" ./song_of_the_day + docker build -t "git.disi.dev/$REPOSITORY_OWNER/song-of-the-day:$(cat $REPOSITORY_NAME/VERSION)" ./ docker push "git.disi.dev/$REPOSITORY_OWNER/song-of-the-day:$(cat $REPOSITORY_NAME/VERSION)" diff --git a/song_of_the_day/Dockerfile b/Dockerfile similarity index 67% rename from song_of_the_day/Dockerfile rename to Dockerfile index 343c85a..1924842 100644 --- a/song_of_the_day/Dockerfile +++ b/Dockerfile @@ -4,9 +4,9 @@ WORKDIR /App # Copy everything COPY . ./ # Restore as distinct layers -RUN dotnet restore +RUN dotnet restore --project ./song_of_the_day/song_of_the_day.csproj # Build and publish a release -RUN dotnet publish -o out +RUN dotnet publish --project ./song_of_the_day/song_of_the_day.csproj -o out # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:9.0