mirror of
https://github.com/telemt/telemt.git
synced 2026-06-26 21:01:14 +03:00
fixed a docker build bug for CI or docker-compose build variations
This commit is contained in:
+12
-2
@@ -55,6 +55,16 @@ RUN set -eux; \
|
|||||||
strip --strip-unneeded /telemt || true; \
|
strip --strip-unneeded /telemt || true; \
|
||||||
rm -f "/tmp/${ASSET}" "/tmp/${ASSET}.sha256" /tmp/telemt
|
rm -f "/tmp/${ASSET}" "/tmp/${ASSET}.sha256" /tmp/telemt
|
||||||
|
|
||||||
|
RUN --mount=type=bind,target=/tmp \
|
||||||
|
mkdir -p /app && \
|
||||||
|
if [ -f /tmp/config.toml ]; then \
|
||||||
|
cp /tmp/config.toml /app/config.toml; \
|
||||||
|
elif [ -f /tmp/config/config.toml ]; then \
|
||||||
|
cp /tmp/config/config.toml /app/config.toml; \
|
||||||
|
else \
|
||||||
|
echo "Config file not found" && exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
# ==========================
|
# ==========================
|
||||||
# Debug Image
|
# Debug Image
|
||||||
# ==========================
|
# ==========================
|
||||||
@@ -99,7 +109,7 @@ RUN set -eux; \
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=minimal /telemt /app/telemt
|
COPY --from=minimal /telemt /app/telemt
|
||||||
COPY ./config/config.toml /app/config.toml
|
COPY --from=minimal /app/config.toml /app/config.toml
|
||||||
|
|
||||||
EXPOSE 443 9090 9091
|
EXPOSE 443 9090 9091
|
||||||
|
|
||||||
@@ -116,7 +126,7 @@ FROM gcr.io/distroless/static-debian12 AS prod
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=minimal /telemt /app/telemt
|
COPY --from=minimal /telemt /app/telemt
|
||||||
COPY ./config/config.toml /app/config.toml
|
COPY --from=minimal /app/config.toml /app/config.toml
|
||||||
|
|
||||||
USER nonroot:nonroot
|
USER nonroot:nonroot
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user