Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker build fails due to missing script build-web.sh #467

Closed
mklampfer opened this issue Jul 24, 2023 · 4 comments
Closed

Docker build fails due to missing script build-web.sh #467

mklampfer opened this issue Jul 24, 2023 · 4 comments

Comments

@mklampfer
Copy link

mklampfer commented Jul 24, 2023

Bug Description

When trying to build a docker image, the build fails because the file 'scripts/build-web.sh' does not exist.

Steps to Reproduce

git clone https://github.com/krille-chan/fluffychat.git

docker build --no-cache -t fluffychat-docker .

[+] Building 11.1s (13/14)                                                                                                                                               
 => [internal] load build definition from Dockerfile                                                                                                                0.0s
 => => transferring dockerfile: 329B                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                   0.0s
 => => transferring context: 2B                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/nginx:alpine                                                                                                     0.5s
 => [internal] load metadata for ghcr.io/cirruslabs/flutter:latest                                                                                                  0.2s
 => CACHED [stage-1 1/3] FROM docker.io/library/nginx:alpine@sha256:2d194184b067db3598771b4cf326cfe6ad5051937ba1132b8b7d4b0184e0d0a6                                0.0s
 => [internal] load build context                                                                                                                                   0.1s
 => => transferring context: 47.86kB                                                                                                                                0.1s
 => CACHED [builder 1/6] FROM ghcr.io/cirruslabs/flutter@sha256:0494a94d0d6bedb87cf28b19f757a4c24ace639fba05e5c5286f5b9bf2b76922                                    0.0s
 => [builder 2/6] RUN sudo apt update && sudo apt install curl -y                                                                                                   7.7s
 => [stage-1 2/3] RUN rm -rf /usr/share/nginx/html                                                                                                                  0.5s
 => [builder 3/6] COPY . /app                                                                                                                                       1.0s 
 => [builder 4/6] WORKDIR /app                                                                                                                                      0.1s 
 => [builder 5/6] RUN ./scripts/prepare-web.sh                                                                                                                      1.4s 
 => ERROR [builder 6/6] RUN ./scripts/build-web.sh                                                                                                                  0.4s 
------                                                                                                                                                                   
 > [builder 6/6] RUN ./scripts/build-web.sh:                                                                                                                             
#0 0.364 /bin/sh: 1: ./scripts/build-web.sh: not found                                                                                                                   
------                                                                                                                                                                   
Dockerfile:6                                                                                                                                                             
--------------------
   4 |     WORKDIR /app
   5 |     RUN ./scripts/prepare-web.sh
   6 | >>> RUN ./scripts/build-web.sh
   7 |     
   8 |     FROM docker.io/nginx:alpine
--------------------
ERROR: failed to solve: process "/bin/sh -c ./scripts/build-web.sh" did not complete successfully: exit code: 127

Expected Behavior

The build should succeed and a docker image should be created.

App Version

commit 54ea513

Additional Platform Information

Ubuntu 22.04 / Linux 5.19.0-43-generic x86_64

Additional Context

No response

@rasos
Copy link

rasos commented Jul 25, 2023

build-web.sh was available in older branches https://gitlab.com/famedly/fluffychat/-/blob/v1.8.0/scripts/build-web.sh?ref_type=tags

@mklampfer
Copy link
Author

mklampfer commented Jul 25, 2023

I tried adding this file and running the build command again. Unfortunately, this produces a non-functioning docker container which will throw a 404 error for everything except index.html.

@mklampfer
Copy link
Author

Setting <base href="/"> in web/index.html seems to have done the trick. I using OIDC, homeserver_picker.dart also needs an adjustment. In line 117, remove the /web from the url: ? '${html.window.origin!}/auth.html'

@krille-chan
Copy link
Owner

I set the base href to / and fixed the docker file. Sl this should be done now 😊 please ping me and reopen if there are other problems

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants