mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix docker build: compile real sources, lf entrypoint
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# Shell scripts must stay LF: CRLF breaks the shebang inside containers.
|
||||||
|
*.sh text eol=lf
|
||||||
+7
-2
@@ -29,9 +29,14 @@ RUN wget -q -O /tmp/ffmpeg.tar.xz "$FFMPEG_URL" \
|
|||||||
&& rm /tmp/ffmpeg.tar.xz \
|
&& rm /tmp/ffmpeg.tar.xz \
|
||||||
&& /usr/local/bin/ffmpeg -version >/dev/null
|
&& /usr/local/bin/ffmpeg -version >/dev/null
|
||||||
|
|
||||||
# 3. Real sources last: only our crates recompile on source changes.
|
# 3. Real sources last: only our crates recompile on source changes. The
|
||||||
|
# COPY preserves host mtimes, which predate the stub artifacts from step 1;
|
||||||
|
# cargo's mtime-based freshness check would otherwise treat the stub build
|
||||||
|
# as up-to-date and never compile the real sources. `touch` forces cargo to
|
||||||
|
# see the real files as newer.
|
||||||
COPY crates/ ./crates/
|
COPY crates/ ./crates/
|
||||||
RUN cargo build --release -p xmedia-bot
|
RUN find crates -type f -name '*.rs' -exec touch {} + \
|
||||||
|
&& cargo build --release -p xmedia-bot
|
||||||
|
|
||||||
# ---------- runtime stage ----------
|
# ---------- runtime stage ----------
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
Reference in New Issue
Block a user