element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
593 stars 93 forks source link

Docker image build fails with `"/dist": not found` #2829

Closed schildbach closed 4 days ago

schildbach commented 4 days ago

Steps to reproduce

(in the project root directory, tag v0.7.0)

docker build .

Outcome

What did you expect?

A ready to run Docker image.

What happened instead?

$ docker build .
[+] Building 2.7s (7/8)                                                                                                       docker:default
 => [internal] load build definition from Dockerfile                                                                                    0.3s
 => => transferring dockerfile: 149B                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                       0.2s
 => => transferring context: 53B                                                                                                        0.0s
 => [internal] load metadata for docker.io/nginxinc/nginx-unprivileged:alpine                                                           1.9s
 => [auth] nginxinc/nginx-unprivileged:pull token for registry-1.docker.io                                                              0.0s
 => [1/3] FROM docker.io/nginxinc/nginx-unprivileged:alpine@sha256:c03cfec61c6ed6a8e6c34749e9bf77e0a01d8f7e352afaf500e2a619459b01c6     0.3s
 => => resolve docker.io/nginxinc/nginx-unprivileged:alpine@sha256:c03cfec61c6ed6a8e6c34749e9bf77e0a01d8f7e352afaf500e2a619459b01c6     0.3s
 => [internal] load build context                                                                                                       0.2s
 => => transferring context: 596B                                                                                                       0.0s
 => ERROR [2/3] COPY ./dist /app                                                                                                        0.0s
------
 > [2/3] COPY ./dist /app:
------
Dockerfile:3
--------------------
   1 |     FROM nginxinc/nginx-unprivileged:alpine
   2 |     
   3 | >>> COPY ./dist /app
   4 |     COPY config/nginx.conf /etc/nginx/conf.d/default.conf
   5 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref af93a94e-b8ad-4377-bb2a-ee82460f7175::pdga3ubwe68qvkf6kfjd3kpkt: "/dist": not found

Operating system

Ubuntu

Browser information

n/a

URL for webapp

n/a

Will you send logs?

No

fkwp commented 4 days ago

you need to run the build steps as described in the README before.

schildbach commented 3 days ago

Now I'm confused. The entire point of "docker build" is you don't need to fiddle around with custom build steps and special build requirements (yarn?). I'd expect the entire build to happen within Docker. See for example Synapse who are doing it this way – no need to install Python.