add locales to container and caching (tho it doesnt work)
This commit is contained in:
parent
7902e76586
commit
31c542c9c5
1 changed files with 7 additions and 9 deletions
16
Dockerfile
16
Dockerfile
|
|
@ -6,12 +6,14 @@ RUN apk add --no-cache musl-dev openssl-dev
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
RUN USER=root cargo init
|
RUN USER=root cargo init
|
||||||
COPY ./Cargo.toml .
|
COPY Cargo.toml .
|
||||||
COPY Cargo.lock .
|
COPY Cargo.lock .
|
||||||
COPY src/ ./src
|
COPY src/ ./src
|
||||||
COPY migrations ./migrations
|
COPY locales/ ./locales/
|
||||||
|
COPY migrations/ ./migrations/
|
||||||
|
|
||||||
RUN touch src/main.rs && cargo build --release
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
touch src/main.rs && cargo build --release
|
||||||
RUN strip target/release/mk-dl-bot
|
RUN strip target/release/mk-dl-bot
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
|
|
@ -21,13 +23,9 @@ RUN apk add --no-cache libgcc
|
||||||
RUN apk add --no-cache ffmpeg python3 py3-pip
|
RUN apk add --no-cache ffmpeg python3 py3-pip
|
||||||
RUN pip install --break-system-packages yt-dlp
|
RUN pip install --break-system-packages yt-dlp
|
||||||
|
|
||||||
# Those directories are required by bot
|
|
||||||
RUN mkdir -p /var/lib/mk-dl-bot
|
|
||||||
RUN mkdir -p /var/log/mk-dl-bot
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY migrations ./migrations
|
COPY migrations/ ./migrations/
|
||||||
COPY locales ./locales
|
COPY locales/ ./locales/
|
||||||
COPY --from=builder /usr/src/app/target/release/mk-dl-bot .
|
COPY --from=builder /usr/src/app/target/release/mk-dl-bot .
|
||||||
|
|
||||||
ENTRYPOINT ["/app/mk-dl-bot"]
|
ENTRYPOINT ["/app/mk-dl-bot"]
|
||||||
Loading…
Add table
Reference in a new issue