-
Notifications
You must be signed in to change notification settings - Fork 0
/
tourcalc.react.docker
30 lines (26 loc) · 1.09 KB
/
tourcalc.react.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#### build UI
FROM --platform=$BUILDPLATFORM docker.io/library/node:latest AS build-React-UI
WORKDIR /src
COPY ./TourCalcWebApp ./TourCalcWebApp
RUN ls
WORKDIR /src/TourCalcWebApp
RUN npm install
RUN npm run buildProd
RUN ls -Rla /src/TourCalcWebApp/wwwroot/assets
# update our latest blazor with react UI
#FROM ghcr.io/dimmik/tourcalc:blazor-latest
# get latest react and update it. Purpose: only update react UI. Which is actually obsolete and is not planned to be updated anymore
FROM ghcr.io/dimmik/tourcalc:react-latest
ARG BUILD_TYPE=na
WORKDIR /app
#RUN dotnet --version
EXPOSE 80
EXPOSE 443
RUN rm -rf /app/wwwroot
COPY --from=build-React-UI /src/TourCalcWebApp/wwwroot /app/wwwroot
## build version
RUN export TZ='Europe/Moscow' && export DT="$(date +"%Y%m%d-%H%M%S")" && grep -Irl "#{Build.BuildNumber}#" . | xargs sed -i 's/#{Build.BuildNumber}#/'$DT'/g'
RUN grep -Irl "#{Build.SourceBranch}#" . | xargs sed -i 's/#{Build.SourceBranch}#/local/g'
RUN grep -Irl '#{BuildType}#' . | xargs sed -i 's/#{BuildType}#/'${BUILD_TYPE}'/g'
#RUN ls -Rla /app/wwwroot
ENTRYPOINT ["dotnet", "TCBlazor.Server.dll"]