From a920b36386bf16aaee5a6a74f0e6d34dbb53fada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique=20Ivanchechen?= Date: Sun, 24 Mar 2024 19:31:39 -0300 Subject: [PATCH] specifying fixed versions for packages --- ActixAPI/Dockerfile | 19 +++++++++---------- Express | 2 +- FlaskAPI/requirements.txt | 6 +++--- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/ActixAPI/Dockerfile b/ActixAPI/Dockerfile index a7c5c7e..999947d 100644 --- a/ActixAPI/Dockerfile +++ b/ActixAPI/Dockerfile @@ -1,5 +1,9 @@ -FROM rust:latest +FROM rust:1.77-buster as builder +WORKDIR /app +COPY . . +RUN cargo build --release +FROM debian:bullseye-slim WORKDIR /app RUN apt-get update && apt-get -y install wget && \ @@ -7,17 +11,12 @@ RUN apt-get update && apt-get -y install wget && \ wget https://files.ivanch.me/api/public/dl/jNlXYMLR/big-image.png && \ wget https://files.ivanch.me/api/public/dl/QdKvaeQI/video.mp4 && \ wget https://files.ivanch.me/api/public/dl/YD4vmSsO/nginx.html && \ - -COPY . . - -RUN cargo build --release && \ - cp ./target/release/ActixAPI . && \ + mkdir -p ./static && \ mv small-image.png ./static && \ mv big-image.png ./static && \ mv video.mp4 ./static && \ - mv nginx.html ./static && \ - ldconfig /usr/local/lib + mv nginx.html ./static -ENV LD_LIBRARY_PATH=/usr/local/lib +COPY --from=builder /app/target/release/ActixAPI . -ENTRYPOINT ["./ActixAPI"] +CMD ["./ActixAPI"] \ No newline at end of file diff --git a/Express b/Express index 3a54792..7348eb9 160000 --- a/Express +++ b/Express @@ -1 +1 @@ -Subproject commit 3a54792794728b10b2f49bd47dbd7430da811bdd +Subproject commit 7348eb993c04d60af3da75d7ec8c8f07493911d7 diff --git a/FlaskAPI/requirements.txt b/FlaskAPI/requirements.txt index 8be1675..1558eaf 100644 --- a/FlaskAPI/requirements.txt +++ b/FlaskAPI/requirements.txt @@ -1,3 +1,3 @@ -Flask>=1.0 -gunicorn>=19.9.0 -protobuf>=4.25.0 \ No newline at end of file +Flask==3.0 +gunicorn==19.9.0 +protobuf==4.25.0 \ No newline at end of file