Skip to content

Commit

Permalink
fix for Dockerfile platforms not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink committed Aug 28, 2024
1 parent f500250 commit 7620cd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/docker/Dockerfile-AasxServerAspNetCore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use a multi-stage build to build and publish the .NET application
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /repo/src

# Copy the source code and build
Expand All @@ -12,7 +12,7 @@ RUN dotnet build -o /out/AasxServerAspNetCore AasxServerAspNetCore -v d
RUN dotnet publish -c Release -v d --no-restore

# Use a runtime image to run the application
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:8.0 as base
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 as base

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 15 in src/docker/Dockerfile-AasxServerAspNetCore

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
EXPOSE 5001/tcp
EXPOSE 5001/udp
ENV ASPNETCORE_URLS=http://+:5001
Expand Down
4 changes: 2 additions & 2 deletions src/docker/Dockerfile-AasxServerBlazor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use a multi-stage build to build and publish the .NET application
# Specify the initial base architecture (amd64 in this case)
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /repo/src

# Copy everything else and build
Expand All @@ -14,7 +14,7 @@ RUN dotnet publish -c Release -v d --no-restore

# Use a runtime image to run the application
# Specify the initial base architecture (amd64 in this case)
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:8.0 as base
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 as base

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Build all docker images

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 17 in src/docker/Dockerfile-AasxServerBlazor

View workflow job for this annotation

GitHub Actions / Create new docker builds with latest prerelease and upload to DockerHub

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /repo/src
RUN apt update && apt upgrade --yes
RUN apt install -y curl nano libgdiplus
Expand Down

0 comments on commit 7620cd8

Please sign in to comment.