diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5a493ef --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +* +!src +!Cargo.* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7008082..6253096 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.50.0 as build +FROM rust:1.78.0 as build WORKDIR /app COPY . . @@ -6,8 +6,12 @@ RUN cargo build --release RUN mkdir -p /build-out RUN cp target/release/actix-messaging /build-out/ -# Ubuntu 18.04 -FROM ubuntu:18.04 as production +# Ubuntu 24.10 +FROM ubuntu:24.10 as production RUN apt-get update && apt-get -y install ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/* -COPY --from=build /build-out/* / \ No newline at end of file +COPY --from=build /build-out/actix-messaging /usr/local/bin/actix-messaging + +ENV PORT=8080 + +ENTRYPOINT [ "/usr/local/bin/actix-messaging" ] \ No newline at end of file