From 21a5793c45c5a050f1a5d6cfe16edc11a3d6014a Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 15 Jul 2022 21:45:18 +0200 Subject: [PATCH] Take into account that git is special snowflake --- .dockerignore | 1 + Dockerfile | 5 +++-- Dockerfile.Service | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index e7946edb4..ce025a5ae 100644 --- a/.dockerignore +++ b/.dockerignore @@ -31,6 +31,7 @@ ASF-ui/dist wiki # Add exception for .git used in ASF-ui, it's used for calculating commit hash during build +!.git/modules/ASF-ui !ASF-ui/.git # _ _ diff --git a/Dockerfile b/Dockerfile index 12e7c0c01..d37a75782 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ ARG IMAGESUFFIX FROM --platform=$BUILDPLATFORM node:lts${IMAGESUFFIX} AS build-node -WORKDIR /app +WORKDIR /app/ASF-ui COPY ASF-ui . +COPY .git/modules/ASF-ui /app/.git/modules/ASF-ui RUN echo "node: $(node --version)" && \ echo "npm: $(npm --version)" && \ npm ci --no-progress && \ @@ -18,7 +19,7 @@ ENV DOTNET_NOLOGO true ENV NET_CORE_VERSION net6.0 ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist +COPY --from=build-node /app/ASF-ui/dist ASF-ui/dist COPY ArchiSteamFarm ArchiSteamFarm COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper COPY resources resources diff --git a/Dockerfile.Service b/Dockerfile.Service index e62b47459..dfc70a26b 100644 --- a/Dockerfile.Service +++ b/Dockerfile.Service @@ -1,8 +1,9 @@ ARG IMAGESUFFIX FROM --platform=$BUILDPLATFORM node:lts${IMAGESUFFIX} AS build-node -WORKDIR /app +WORKDIR /app/ASF-ui COPY ASF-ui . +COPY .git/modules/ASF-ui /app/.git/modules/ASF-ui RUN echo "node: $(node --version)" && \ echo "npm: $(npm --version)" && \ npm ci --no-progress && \ @@ -18,7 +19,7 @@ ENV DOTNET_NOLOGO true ENV NET_CORE_VERSION net6.0 ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper WORKDIR /app -COPY --from=build-node /app/dist ASF-ui/dist +COPY --from=build-node /app/ASF-ui/dist ASF-ui/dist COPY ArchiSteamFarm ArchiSteamFarm COPY ArchiSteamFarm.OfficialPlugins.SteamTokenDumper ArchiSteamFarm.OfficialPlugins.SteamTokenDumper COPY resources resources