Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Problem building from Dockerfile #694

Closed
jmizv opened this issue May 7, 2024 · 4 comments
Closed

Problem building from Dockerfile #694

jmizv opened this issue May 7, 2024 · 4 comments

Comments

@jmizv
Copy link
Contributor

jmizv commented May 7, 2024

I've downloaded the Dockerfile and executed the command as suggested but I got:

 => CACHED [build 3/5] WORKDIR /tmp/brouter                                                                                                                                                                                                                                            0.0s
 => [build 4/5] COPY . .                                                                                                                                                                                                                                                               0.9s
 => ERROR [build 5/5] RUN ./gradle clean build                                                                                                                                                                                                                                         0.3s
------
 > [build 5/5] RUN ./gradle clean build:
0.262 /bin/sh: 1: ./gradle: not found
------
Dockerfile:6
--------------------
   4 |     WORKDIR /tmp/brouter
   5 |     COPY . .
   6 | >>> RUN ./gradle clean build
   7 |     
   8 |     FROM openjdk:17.0.1-jdk-slim
--------------------
ERROR: failed to solve: process "/bin/sh -c ./gradle clean build" did not complete successfully: exit code: 127

I work on Ubuntu 22.4. Did I miss something?

@zod
Copy link
Collaborator

zod commented May 8, 2024

It seems like you modified the Dockerfile. It calls the Gradle wrapper ./gradlew.

You also need to clone the whole repository, not just download the Dockerfile

@jmizv
Copy link
Contributor Author

jmizv commented May 8, 2024

It seems like you modified the Dockerfile. It calls the Gradle wrapper ./gradlew.

You also need to clone the whole repository, not just download the Dockerfile

At first I tried with ./gradlew with the same result.

Okay, thanks for the hint with using the whole repository. I will try this.

@jmizv jmizv closed this as completed May 8, 2024
@jmizv
Copy link
Contributor Author

jmizv commented Jun 17, 2024

I gave this another try.

I've cloned the whole repository and followed the steps mentioned in the README.md. After building the Docker image from scratch and downloading some segment files I tried to start the brouter container but it failed with the following problem:

brouter$ docker run --rm -v ./misc/scripts/segments4:/segments4 brouter
ls: cannot access '../../../brouter-server/build/libs/brouter-*-all.jar': No such file or directory
Error: Could not find or load main class ......segments4
Caused by: java.lang.ClassNotFoundException: //////segments4

What am I doing wrong? 🤔

@jmizv jmizv reopened this Jun 17, 2024
@jmizv
Copy link
Contributor Author

jmizv commented Jun 17, 2024

Seems to work now, sorry, for the inconvenience. I've just rebuild it...

@jmizv jmizv closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants