From 7bd68fedae2cf51f917fc89dcad82f2e25803aaa Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Thu, 2 May 2024 18:16:05 +0200 Subject: [PATCH] remove docker stuff since it has been centralized --- .run/Dockerfile.run.xml | 53 ----------------------------------------- Dockerfile | 44 ---------------------------------- 2 files changed, 97 deletions(-) delete mode 100644 .run/Dockerfile.run.xml delete mode 100644 Dockerfile diff --git a/.run/Dockerfile.run.xml b/.run/Dockerfile.run.xml deleted file mode 100644 index e0d9077..0000000 --- a/.run/Dockerfile.run.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 8e50648..0000000 --- a/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef -WORKDIR /app - -FROM chef AS planner -COPY /src ./src -COPY /Cargo.toml . -COPY /Cargo.lock . -RUN cargo chef prepare --recipe-path recipe.json - -FROM chef AS builder -COPY --from=planner /app/recipe.json recipe.json -# Build dependencies - this is the caching Docker layer! -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/home/root/app/target \ - cargo chef cook --release --locked --recipe-path recipe.json -# Build application -COPY /src ./src -COPY /Cargo.toml . -COPY /Cargo.lock . -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/home/root/app/target \ - cargo build --release --locked - -# We do not need the Rust toolchain to run the binary! -FROM debian:bookworm AS runtime -WORKDIR /app -ARG PROGNAME -RUN apt-get update && apt-get install -y libssl-dev coreutils ffmpeg -# Create a script to run the command and sleep for one hour after the command is done -RUN echo "#!/bin/bash \n \ - echo \"Running command: '$PROGNAME'\" \n \ - # Run your command \n \ - $PROGNAME \n \ - echo \"Done with normal command. Sleeping for one hour\" \n \ - # Sleep for one hour \n \ - sleep 3600 \n \ - echo \"Done with sleep. Exiting\" \ - " > /app/entrypoint.sh - -# Make the script executable -RUN chmod +x /app/entrypoint.sh -COPY --from=builder /app/target/release/$PROGNAME /usr/local/bin/$PROGNAME - -CMD ["/app/entrypoint.sh"]