Skip to content

Commit

Permalink
chore: Move global dotnet tool installation in migration docker file (#…
Browse files Browse the repository at this point in the history
…1495)

Stable layers ⬆️
  • Loading branch information
oskogstad authored Nov 19, 2024
1 parent 9fbd2cf commit fcfe96f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:9.0.100@sha256:7d24e90a392e88eb56093e4eb325ff883ad609382a55d42f17fd557b997022ca AS build
WORKDIR /src

RUN dotnet tool install --global dotnet-ef
ENV PATH $PATH:/root/.dotnet/tools

Check warning on line 8 in src/Digdir.Domain.Dialogporten.Infrastructure/MigrationBundle.dockerfile

View workflow job for this annotation

GitHub Actions / Build and publish docker images / publish-docker-images (./src/Digdir.Domain.Dialogporten.Infrastructure/MigrationBundle.dockerfile...

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

COPY [".editorconfig", "."]
COPY ["Directory.Build.props", "."]

Expand All @@ -20,8 +23,6 @@ COPY ["src/", "."]

WORKDIR "/src/Digdir.Domain.Dialogporten.Infrastructure"
RUN mkdir -p /app/publish
RUN dotnet tool install --global dotnet-ef
ENV PATH $PATH:/root/.dotnet/tools
RUN dotnet ef migrations -v bundle -o /app/publish/efbundle

FROM base AS final
Expand Down

0 comments on commit fcfe96f

Please sign in to comment.