diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index 412adece29..1e7ac1b489 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -1,3 +1,14 @@ +############################################### +# Node.js build stage # +############################################### +FROM node:20-alpine AS node-build + +WORKDIR /app +COPY src/Admin/package*.json ./ +COPY /src/Admin/ . +RUN npm ci +RUN npm run build + ############################################### # Build stage # ############################################### @@ -20,12 +31,13 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ && echo "RID=$RID" > /tmp/rid.txt # Set up Node -ARG NODE_VERSION=20 -RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \ - && apt-get update \ - && apt-get install -y nodejs \ - && npm install -g npm@latest && \ - rm -rf /var/lib/apt/lists/* +# ARG NODE_VERSION=20 +# RUN apk add --no-cache "nodejs~${NODE_VERSION}" "npm" +# RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \ +# && apt-get update \ +# && apt-get install -y nodejs \ +# && npm install -g npm@latest && \ +# rm -rf /var/lib/apt/lists/* # Copy required project files WORKDIR /source @@ -33,11 +45,11 @@ COPY . ./ # Restore project dependencies and tools WORKDIR /source/src/Admin -RUN npm ci +#RUN npm ci RUN . /tmp/rid.txt && dotnet restore -r $RID # Build project -RUN npm run build +#RUN npm run build RUN . /tmp/rid.txt && dotnet publish \ -c release \ --no-restore \ @@ -60,12 +72,15 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ + tzdata \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* # Copy app from the build stage WORKDIR /app COPY --from=build /source/src/Admin/out /app +COPY --from=node-build /app/wwwroot /app/wwwroot COPY ./src/Admin/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1 diff --git a/src/Admin/wwwroot/favicon.ico b/src/Admin/wwwroot/favicon.ico deleted file mode 100644 index 841840dfe1..0000000000 Binary files a/src/Admin/wwwroot/favicon.ico and /dev/null differ diff --git a/src/Billing/Dockerfile b/src/Billing/Dockerfile index 96d325ec28..0bdf218338 100644 --- a/src/Billing/Dockerfile +++ b/src/Billing/Dockerfile @@ -51,6 +51,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* diff --git a/src/Events/Dockerfile b/src/Events/Dockerfile index ed611ba1ff..0ae1b06b19 100644 --- a/src/Events/Dockerfile +++ b/src/Events/Dockerfile @@ -51,6 +51,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* diff --git a/src/EventsProcessor/Dockerfile b/src/EventsProcessor/Dockerfile index f3ca04dd51..ac2032aa39 100644 --- a/src/EventsProcessor/Dockerfile +++ b/src/EventsProcessor/Dockerfile @@ -51,6 +51,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* diff --git a/src/Icons/Dockerfile b/src/Icons/Dockerfile index ed3c18eac0..5015399bb6 100644 --- a/src/Icons/Dockerfile +++ b/src/Icons/Dockerfile @@ -50,6 +50,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* diff --git a/src/Identity/Dockerfile b/src/Identity/Dockerfile index 93e6001100..d8712f0670 100644 --- a/src/Identity/Dockerfile +++ b/src/Identity/Dockerfile @@ -51,6 +51,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/* diff --git a/src/Notifications/Dockerfile b/src/Notifications/Dockerfile index 75d39b4fb8..ca6c44fa8f 100644 --- a/src/Notifications/Dockerfile +++ b/src/Notifications/Dockerfile @@ -51,6 +51,7 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false EXPOSE 5000 RUN apk add curl \ + icu-libs \ && apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \ && rm -rf /var/cache/apk/*