forked from dapr/quickstarts
-
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.
Fixing build.yaml github action workflow with modern dockerfiles. go …
…for dist calculator already fixed by dapr#1058 Signed-off-by: Paul Yuknewicz <[email protected]>
- Loading branch information
Showing
11 changed files
with
49 additions
and
17 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,7 +1,23 @@ | ||
# Note: we cannot do a staged dotnet docker build here for arm/arm64. | ||
# Use the official .NET 7 SDK image to build the application | ||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build | ||
WORKDIR /app | ||
|
||
# Copy the project file and restore dependencies | ||
COPY *.csproj ./ | ||
RUN dotnet clean | ||
RUN dotnet restore --disable-parallel | ||
|
||
# Copy the rest of the application code and build the application | ||
COPY . ./ | ||
RUN dotnet publish -c Release -o out | ||
|
||
# Build runtime image | ||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 | ||
# Use the official .NET 7 runtime image to run the application | ||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime | ||
WORKDIR /app | ||
COPY /out . | ||
ENTRYPOINT ["dotnet", "Subtract.dll"] | ||
COPY --from=build /app/out . | ||
|
||
# Expose the port the application runs on | ||
EXPOSE 80 | ||
|
||
# Run the application | ||
ENTRYPOINT ["dotnet", "YourProjectName.dll"] |
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,4 +1,4 @@ | ||
FROM node:17-alpine | ||
FROM node:20-alpine | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN npm install | ||
|
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,4 +1,4 @@ | ||
FROM python:3.7-alpine | ||
FROM python:3.12-alpine | ||
COPY . /app | ||
WORKDIR /app | ||
RUN pip install flask flask_cors | ||
|
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,4 +1,4 @@ | ||
FROM node:17-alpine | ||
FROM node:20-alpine | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN npm install | ||
|
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,4 +1,4 @@ | ||
FROM node:17-alpine | ||
FROM node:20-alpine | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install | ||
|
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,4 +1,4 @@ | ||
FROM python:3.7-alpine | ||
FROM python:3.12-alpine | ||
WORKDIR /app | ||
COPY . . | ||
RUN pip install requests | ||
|
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,4 +1,4 @@ | ||
FROM python:3.7-alpine | ||
FROM python:3.12-alpine | ||
COPY . /app | ||
WORKDIR /app | ||
RUN pip install flask flask_cors | ||
|
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,6 +1,22 @@ | ||
# Note: we cannot do a staged dotnet docker build here for arm/arm64. | ||
# Use the official .NET 8 SDK image to build the application | ||
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /app | ||
|
||
# Copy the project file and restore dependencies | ||
COPY *.csproj ./ | ||
RUN dotnet restore --disable-parallel | ||
|
||
# Copy the rest of the application code and build the application | ||
COPY . ./ | ||
RUN dotnet publish -c Release -o out | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
# Use the official .NET 8 runtime image to run the application | ||
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime | ||
WORKDIR /app | ||
COPY /out . | ||
COPY --from=build /app/out . | ||
|
||
# Expose the port the application runs on | ||
EXPOSE 80 | ||
|
||
# Run the application | ||
ENTRYPOINT ["dotnet", "csharp-subscriber.dll"] |
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,4 +1,4 @@ | ||
FROM node:17-alpine | ||
FROM node:20-alpine | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN npm install | ||
|
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,4 +1,4 @@ | ||
FROM python:3.7-alpine | ||
FROM python:3.12-alpine | ||
COPY . /app | ||
WORKDIR /app | ||
RUN pip install flask flask_cors | ||
|
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,4 +1,4 @@ | ||
FROM node:17-alpine | ||
FROM node:20-alpine | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN npm run build | ||
|