[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:
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).12 Replies
I guess the Deno version in
may be outdated? I use
and sometimes even (for testing)
Thanks. There is a 2.5.2 released a couple of days ago, but that would not really explain it, and it's not really outdated. I want to stick it to a version I've tested.
I just simplified the dockerfile and now get a core dump
Fun.
Well, this works for me -> https://github.com/fry69/orw/blob/fresh-vite/orw-deno/Containerfile
Except for the
nodeModulesDir
-> auto
bug (should be manual
to avoid messing with the said folder during build and at best all times currently, that is Deno bug), I not yet found a way to break or disappoint me.Oooh. I just realized the error is actually only happening in linux arm64, not linux amd64. I'll try upgrading, maybe it was some more "behind-the-scenes" bug.
Side note: Instead of deleting stuff after copying it into the image, you can use a
.dockerignore
file -> https://github.com/fry69/orw/blob/fresh-vite/orw-deno/.dockerignoreOh, it's not copied, but I "double check" there.
It's already in the
.dockerignore
if you check it.Well, it is bit overkill. The image gets created fresh and if you do not copy those things in, they are not there 🙂
So it's a quick command 😉
It is not just a quick command, you create another layer with it.
Ah, that's a good point
Alright, it's still failing on arm64. I'm pretty sure this is indicative of some deeper bug in Deno, but I don't want to spend too much time looking into it right now. For now I'll just disable arm64 and keep amd64, for the new release.
Yep, I only have tested AMD64 and AARCH64 (Apple Silicon), not ARM64/Linux.
Same here, arm64 was in CI. I won't mark this as resolved to give the team an opportunity to look into it.