Hubro / clipface

Self-hosted web application for sharing video clips
MIT License
118 stars 12 forks source link

"failed to compute cache key" when building image on Windows #47

Closed snnacks closed 2 years ago

snnacks commented 2 years ago

Hopefully this is the right place to ask this because I have searched around trying to figure out what is wrong, but cannot seem to do it. I am trying to build the docker image on Windows so I can start working on it so I can begin learning how to code and also possibly help develop Clipface. When building the docker image using docker build --pull --rm -f "Dockerfile" -t clipface:latest "." I get the following:

[+] Building 1.7s (6/8)
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 300B                                                                               0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:alpine                                                     1.6s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 28B                                                                                   0.0s
 => CANCELED [1/4] FROM docker.io/library/node:alpine@sha256:e64dc950217610c86f29aef803b123e1b6a4a372d6fa4bcf71f9  0.0s
 => => resolve docker.io/library/node:alpine@sha256:e64dc950217610c86f29aef803b123e1b6a4a372d6fa4bcf71f9ddcbd39eb  0.0s
 => => sha256:e64dc950217610c86f29aef803b123e1b6a4a372d6fa4bcf71f9ddcbd39eba5c 1.43kB / 1.43kB                     0.0s
 => => sha256:3888dace40316274a4666539d239e081976a01c2e460f3230b1bf49433d805f8 1.16kB / 1.16kB                     0.0s
 => => sha256:bb1fcdaff9369c498f6161d85f8a082c10012c0a8d6b9c76f5140abce7841c78 6.53kB / 6.53kB                     0.0s
 => ERROR [2/4] ADD client/docker-bundle.tgz /                                                                     0.0s
------
 > [2/4] ADD client/docker-bundle.tgz /:
------
failed to compute cache key: "/client/docker-bundle.tgz" not found: not found

What am I doing wrong?

Hubro commented 2 years ago

Hi @Snnackss, good question :smile: To simplify the Dockerfile, I decided to build the client on the host and package it into a bundle. That bundle is then copied into the Docker image during the build process.

You should be able to just run the build-docker-image.sh script. It builds the client, bundles it and then builds the Clipface Docker image.

EDIT: The right place would probably have been on the Discussions page though, under "Q&A" :smile: