docker icon indicating copy to clipboard operation
docker copied to clipboard

One-Click Deployment Fails Due to Missing /calcom/.yarn Directory

Open lucian-duta opened this issue 10 months ago • 0 comments

One-Click Deployment Fails Due to Missing /calcom/.yarn Directory

Issue Description

Attempting a one-click deployment using the following command:

cloudshell_open --repo_url "https://github.com/calcom/docker" --page "shell" --force_new_clone"

results in a failure during the Docker build process due to a missing /calcom/.yarn directory.

Steps to Reproduce

  1. Run the one-click deployment command in Google Cloud Shell:
    cloudshell_open --repo_url "https://github.com/calcom/docker" --page "shell" --force_new_clone"
    
  2. Follow the prompts to select a project and region.
  3. Wait for the deployment process to proceed.
  4. The build process fails with the following error:

Error Log

[ ✖ ] Failed to build container image.
Error: attempted to build and failed: docker build failed: exit status 1, output:
Dockerfile:52
--------------------
  50 |     
  51 |     COPY calcom/package.json calcom/.yarnrc.yml calcom/turbo.json calcom/i18n.json ./
  52 | >>> COPY calcom/.yarn ./.yarn
  53 |     COPY --from=builder /calcom/yarn.lock ./yarn.lock
  54 |     COPY --from=builder /calcom/node_modules ./node_modules
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref c85e4d29-9d69-41c7-b7c8-3b930b37889c::wjhwitzfgj23hi5rbzh1ng837: "/calcom/.yarn": not found

Expected Behavior

The one-click deployment should successfully build the container without missing dependencies.

Possible Cause

  • The calcom directory appears to be empty or missing required files.
  • The repository may require Git submodules, but they are not initialized by the one-click deployment.
  • .dockerignore might be excluding necessary dependencies.

Workaround

Manually initialize submodules before running the build:

cd docker
git submodule update --init --recursive
docker build -t us-west2-docker.pkg.dev/rennted-cal-booking/cloud-run-source-deploy/docker .

Suggested Fix

  • Ensure that git submodule update --init --recursive runs automatically when using the one-click deployment.
  • Verify that the calcom/.yarn directory is correctly populated before copying it in Dockerfile.
  • Update documentation to clarify any required pre-setup steps.

lucian-duta avatar Feb 24 '25 14:02 lucian-duta