add Docker support: docker-compose with local path

This commit is contained in:
Danila Gamkov
2025-10-29 12:15:21 +03:00
parent cf445dc99c
commit 14c306818c
5 changed files with 74 additions and 2 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
# build rust
FROM rust:1.82 AS builder
WORKDIR /app/asotr_csv
COPY ./asotr_csv/ /app/asotr_csv/
RUN cargo build --release
# main image:
FROM python:3.10-slim-bookworm
WORKDIR /app
COPY ./bin/requirements.txt /app/
RUN pip install -r requirements.txt
COPY ./bin/* /app/bin/
COPY --from=builder /app/asotr_csv/target/release/asotr_csv /app/bin/asotr_csv
RUN chmod +x /app/bin/*.sh || true && chmod +x /app/bin/asotr_csv || true
ENV PYTHONUNBUFFERED=1
# ENV PATH="/app/bin:${PATH}"
WORKDIR /app/bin
# ENTRYPOINT ["/bin/bash"]