From 37099f89d3844b41694dd7e0e292dae186ab6413 Mon Sep 17 00:00:00 2001 From: codingsh Date: Mon, 2 Dec 2024 12:19:01 +0000 Subject: [PATCH] chore(docker): change docker ref: https://warpcast.com/anakvad/0x3e6f6801 --- Dockerfile | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0680f0e..04b506b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM rustlang/rust:nightly AS builder - RUN apt-get update && \ apt-get install -y \ pkg-config \ @@ -15,20 +14,10 @@ RUN apt-get update && \ WORKDIR /usr/src/app - COPY Cargo.toml Cargo.lock* ./ - -RUN mkdir src && \ - echo "fn main() { println!(\"Initializing build...\"); }" > src/main.rs && \ - cargo build --release && \ - cargo build --tests && \ - rm -rf src - - COPY src src/ - ARG RUST_LOG=info ENV RUST_LOG=${RUST_LOG} @@ -36,12 +25,11 @@ RUN echo "Building application with RUST_LOG=${RUST_LOG}" && \ cargo build --release && \ cargo test --no-run - FROM debian:bookworm-slim - RUN apt-get update && \ apt-get install -y \ + bash \ ca-certificates \ libwebkit2gtk-4.0-37 \ libjavascriptcoregtk-4.0-18 \ @@ -55,13 +43,10 @@ RUN apt-get update && \ libxdo3 && \ rm -rf /var/lib/apt/lists/* - COPY --from=builder /usr/src/app/target/release/titanium /usr/local/bin/ - ENV RUST_LOG=info - COPY <<'EOF' /usr/local/bin/start.sh #!/bin/bash echo "Starting Titanium server with RUST_LOG=${RUST_LOG}"