thecommons-urbit / chess

Distribution repo for Urbit Chess app
Other
24 stars 8 forks source link

Docker upgrade on MacOS breaks the build.sh #149

Closed brbenji closed 4 months ago

brbenji commented 1 year ago

Error 1

After the Docker app upgrade, running bin/build.sh -s zod would produce the output below and not build anything.

❯ bin/build.sh -s zod
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
            environment-variable.

2023/09/07 08:10:29 must use ASL logging (which requires CGO) if running as root

Solution 1

In the bin/build.sh file comment out the line with DOCKER_BUILDKIT=0 and uncomment out the line without DOCKER_BUILDKIT=0 in it.

# sudo docker build --tag ${DOCKER_IMAGE}:${VERSION_FULL} .
sudo DOCKER_BUILDKIT=0 docker build --tag ${DOCKER_IMAGE}:${VERSION_FULL} .

like this.

sudo docker build --tag ${DOCKER_IMAGE}:${VERSION_FULL} .
# sudo DOCKER_BUILDKIT=0 docker build --tag ${DOCKER_IMAGE}:${VERSION_FULL} .

Error 2

❯ sudo bin/build.sh -s zod
[+] Building 0.2s (2/3)                                            docker:desktop-linux
[+] Building 0.3s (3/3) FINISHED                                   docker:desktop-linux
 => [internal] load build definition from Dockerfile                               0.0s
 => => transferring dockerfile: 807B                                               0.0s
 => [internal] load .dockerignore                                                  0.0s
 => => transferring context: 2B                                                    0.0s
 => ERROR resolve image config for docker.io/docker/dockerfile:1                   0.2s
------
 > resolve image config for docker.io/docker/dockerfile:1:
------
Dockerfile:1
--------------------
   1 | >>> # syntax=docker/dockerfile:1
   2 |
   3 |     FROM node:slim
--------------------
ERROR: failed to solve: error getting credentials - err: exit status 1, out: ``

Note: I had to start running sudo for potentially unrelated reasons.

Solution 2

Open ~/.docker/config.json and change the "credsStore": line from "credsStore": "desktop", to "credsStore": "osxkeychain",.

My config.json file looks like this.

{
    "auths": {},
    "credsStore": "osxkeychain",
    "currentContext": "desktop-linux"
}

Error 3

mkdir operation not permitted. This one could be my fault for messing with folder ownership.

docker: Error response from daemon: error while creating mount source path '/host_mnt/Users/nordus/dev/urbit/chess-tree/browse-completed-games/build/frontend': mkdir /host_mnt/Users/nordus/dev/urbit/chess-tree/browse-completed-games/build/frontend: operation not permitted.

No solution just yet. All the other solutions above might be a mistake.

ashelkovnykov commented 1 year ago

@bonbud-macryg Do you still need DOCKER_BUILDKIT=0 for you MacOS version?

ashelkovnykov commented 1 year ago

@bonbud-macryg That's the same error as @brbenji got afterwards (Error 2). What if you apply the same solution that he did?

ashelkovnykov commented 12 months ago

@bonbud-macryg Ping on the above question

brbenji commented 11 months ago

I'll give it a shot in half an hour.

brbenji commented 11 months ago

After two long upgrades into docker v4.24.0 the bin/build -s zod worked fine. I did have to increase the amount of disk space for docker to use, but that shouldn't be related to this.

I tested all the combination. I did it in a strange order but here is what I got.