From dea85099a21fc6f0976e2f5c866c79e0ee31f702 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 16 Sep 2024 14:17:15 -0400 Subject: [PATCH] collab: Override Cargo configuration in the `Dockerfile` (#17901) This PR moves the override for the Cargo configuration for collab into the `Dockerfile` rather than having it be something some in the external environment. This makes it possible to build the Docker image locally without having to replace `.cargo/config.toml` with the contents of `.cargo/collab-config.toml`. Release Notes: - N/A --- .github/workflows/deploy_collab.yml | 3 --- Dockerfile | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_collab.yml b/.github/workflows/deploy_collab.yml index 4555698ecd56904e076c9719212c6859f39e2e19..6801be2a5494cda356f9258f31623b1c484f98f6 100644 --- a/.github/workflows/deploy_collab.yml +++ b/.github/workflows/deploy_collab.yml @@ -75,9 +75,6 @@ jobs: with: clean: false - - name: Set up default .cargo/config.toml - run: cp ./.cargo/collab-config.toml ./.cargo/config.toml - - name: Build docker image run: docker build . --build-arg GITHUB_SHA=$GITHUB_SHA --tag registry.digitalocean.com/zed/collab:$GITHUB_SHA diff --git a/Dockerfile b/Dockerfile index 2185eb6cb4d959747bbf4e9cf2e862f5f5ee385e..2fb5f0414787f845357d72ec9167a2428dd33242 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ FROM rust:1.81-bookworm as builder WORKDIR app COPY . . +# Replace the Cargo configuration with the one used by collab. +COPY ./.cargo/collab-config.toml ./.cargo/config.toml + # Compile collab server ARG CARGO_PROFILE_RELEASE_PANIC=abort ARG GITHUB_SHA