-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Renat Shajmardanov <[email protected]>
- Loading branch information
Renat Shaymardanov
and
Renat Shajmardanov
authored
Dec 21, 2023
1 parent
eeb6dda
commit dd435f8
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy as builder | ||
|
||
# Must be linux/amd64 or linux/arm64 | ||
ARG TARGETARCH | ||
|
||
COPY src ./src | ||
COPY mysql-data-mover.sln . | ||
|
||
ENV SOLUTION_NAME "./mysql-data-mover.sln" | ||
|
||
RUN dotnet restore ${SOLUTION_NAME} | ||
RUN dotnet build --no-restore --configuration Release ${SOLUTION_NAME} | ||
RUN dotnet restore ${SOLUTION_NAME} --arch ${TARGETARCH} --packages /packages/${TARGETARCH} | ||
RUN dotnet build --no-restore --source /packages/${TARGETARCH} --configuration Release ${SOLUTION_NAME} | ||
RUN dotnet test --no-restore --configuration Release ${SOLUTION_NAME} | ||
RUN dotnet publish --no-restore --configuration Release --property:PublishDir=/output ${SOLUTION_NAME} | ||
RUN dotnet publish --no-restore --source /packages/${TARGETARCH} --configuration Release --property:PublishDir=/output/${TARGETARCH} ${SOLUTION_NAME} | ||
|
||
FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy-chiseled | ||
|
||
# Must be linux/amd64 or linux/arm64 | ||
ARG TARGETARCH | ||
|
||
WORKDIR /app | ||
COPY --from=builder ./output/ . | ||
COPY --from=builder ./output/${TARGETARCH} . | ||
ENTRYPOINT ["dotnet", "Dodo.DataMover.dll"] |