From cc985de4b12f6f84c0c4e98eefe4f3d182eec2c3 Mon Sep 17 00:00:00 2001 From: David Thomas Date: Wed, 18 Oct 2023 09:16:01 +0100 Subject: [PATCH] Simplify github action build --- .github/workflows/docker.yml | 3 --- Dockerfile | 8 -------- Dockerfile-dev | 27 --------------------------- 3 files changed, 38 deletions(-) delete mode 100644 Dockerfile-dev diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 050ac0a..652342e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,9 +9,6 @@ jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/Dockerfile b/Dockerfile index 4629481..c6e5e90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,6 @@ WORKDIR /bot RUN apt-get update && apt-get install -y cmake && apt-get clean -# This is a dummy build to get the dependencies cached. -COPY Cargo.toml Cargo.lock ./ -RUN mkdir src && \ - echo "// dummy file" > src/lib.rs && \ - cargo build --release && \ - rm -r src - -# This is the actual build, copy in the rest of the sources COPY . . RUN cargo build --release diff --git a/Dockerfile-dev b/Dockerfile-dev deleted file mode 100644 index 29f9476..0000000 --- a/Dockerfile-dev +++ /dev/null @@ -1,27 +0,0 @@ -FROM rustlang/rust:nightly as builder -ENV RUSTFLAGS="-C target-cpu=native" - -WORKDIR /bot - -RUN apt-get update && apt-get install -y cmake && apt-get clean - -# This is a dummy build to get the dependencies cached. -COPY Cargo.toml Cargo.lock ./ -RUN mkdir src && \ - echo "// dummy file" > src/lib.rs && \ - cargo build && \ - rm -r src - -# This is the actual build, copy in the rest of the sources -COPY . . -RUN cargo build - -# Now make the runtime container -FROM debian:buster-slim - -RUN apt-get update && apt-get upgrade -y && apt-get install -y ffmpeg ca-certificates && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /bot/target/debug/discord_tts_bot /usr/local/bin/discord_tts_bot -COPY Cargo.lock . - -CMD ["/usr/local/bin/discord_tts_bot"]