-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate index.html in container at build time
- Loading branch information
Showing
2 changed files
with
25 additions
and
11 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,24 +1,37 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine as build | ||
|
||
# install nodejs/npm to build cc-implementation | ||
RUN apk update && apk add --no-cache nodejs npm | ||
|
||
WORKDIR /app | ||
|
||
COPY ./src/PushTX . | ||
|
||
COPY ./src . | ||
|
||
# regenerate index.html from source | ||
RUN \ | ||
cd /app/cc-implementation && \ | ||
npm install && \ | ||
npm run build | ||
|
||
# compile PushTX app | ||
RUN \ | ||
cd /app/PushTX && \ | ||
dotnet restore && \ | ||
dotnet publish -c Release -o out | ||
|
||
# start from aspnet runtime | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine | ||
|
||
RUN apk update && \ | ||
apk add --no-cache \ | ||
nginx yq \ | ||
# install nginx and yq | ||
RUN \ | ||
apk update && \ | ||
apk add --no-cache nginx yq && \ | ||
rm -rf \ | ||
/tmp/* \ | ||
/var/cache/apk/* \ | ||
/var/tmp/* | ||
/tmp/* \ | ||
/var/cache/apk/* \ | ||
/var/tmp/* | ||
|
||
WORKDIR /app | ||
|
||
COPY --chmod=755 ./docker_entrypoint.sh /app/docker_entrypoint.sh | ||
COPY --from=build /app/out /app | ||
COPY --from=build /app/PushTX/out /app |
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