Bruno BernardinoB
Denoβ€’4mo agoβ€’
22 replies
Bruno Bernardino

[Fresh] Docker build issue in CI after upgrading from v1 to v2

Alright, so I've been upgrading Fresh from v1 to v2 in bewCloud (https://bewcloud.com) for a while, and gave up a couple of times, but finally got everything working. It also builds in Docker locally without issues and everything seems to be fine.

I really dislike the use of vite but couldn't get around it, unfortunately. Builds and tests got slower, but I guess that's the price for getting some progress. The app itself seems to have suffered no big problem.

But I digress; the main issue I'm currently having, which is preventing a new release, is the fact that it fails to build a docker image in CI. It fails with a really weird error, about the deno.lock file:

...
#19 10.87 Task build vite build
...
#19 28.44 error during build:
#19 28.44 Error: Failed reading lockfile at '/app/deno.lock': Unsupported lockfile version ''. Try upgrading Deno or recreating the lockfile
#19 28.44     at __wbindgen_error_new (https://jsr.io/@deno/loader/0.3.6/src/lib/rs_lib.internal.js:1153:15)
...
------
Dockerfile:15
--------------------
  13 |     
  14 |     # Build fresh
  15 | >>> RUN deno task build
  16 |     
  17 |     RUN chown -R deno:deno /app /deno-dir
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c deno task build" did not complete successfully: exit code: 1


You can see the current code in https://github.com/bewcloud/bewcloud with the Dockerfile at https://github.com/bewcloud/bewcloud/blob/main/Dockerfile and the CI action https://github.com/bewcloud/bewcloud/blob/main/.github/workflows/build-docker-image.yml#L46-L54

I'm not sure what to do, here. Docker builds locally, and the deno.lock file is there and is valid. If I remove it, it'll fail trying to resolve some dependencies (both locally and in CI).
Was this page helpful?