-
Notifications
You must be signed in to change notification settings - Fork 34
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
A dockefile or compose setup ? #4
Comments
I've started something, it's very basic and chatgpt has done most of the work. FROM ekidd/rust-musl-builder:stable
# Install system dependencies
RUN sudo apt-get update && \
sudo apt-get install -y \
libgtk-3-dev \
libsoup2.4-dev \
libwebkit2gtk-4.0-dev
# Set the working directory
WORKDIR /app
# Copy the project files to the container
COPY . .
# Build the project
RUN cargo build --release
# Set the entrypoint to run the project
CMD ["cargo", "run", "--release"]
I'm getting errors related to dependencies => ERROR [5/5] RUN cargo build --release 318.6s
------
> [5/5] RUN cargo build --release:
#0 1.057 Updating crates.io index
#0 306.1 Updating git repository `https://github.com/terhechte/dioxus.git`
#0 312.9 Updating git repository `https://github.com/terhechte/navicula`
#0 314.2 Updating git repository `https://github.com/terhechte/cacao`
#0 315.7 Updating git repository `https://github.com/terhechte/megalodon-rs`
#0 317.1 Updating git repository `https://github.com/terhechte/muda.git`
#0 318.4 error: failed to select a version for the requirement `env_logger = "^0.10.0"`
#0 318.4 candidate versions found which didn't match: 0.9.3, 0.9.2, 0.9.1, ...
#0 318.4 location searched: crates.io index
#0 318.4 required by package `ebou v0.2.0 (/app)`
------
Dockerfile:20
--------------------
18 |
19 | # Build the project
20 | >>> RUN cargo build --release
21 |
22 | # Set the entrypoint to run the project
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101 any idea of what is going on @terhechte ? |
Now that @cantudo his PR has been merged, building for Linux in a docker file should also work. Can you try again but with the following sudo apt-get update && sudo apt-get install pkg-config libssl-dev libgtk-3-dev xdotool libxdo-dev libwebkit2gtk-4.1-dev libgtk-3-0 libgtk-3-dev That should include all required dependencies. |
same issue ------
> [5/5] RUN cargo build --release:
#0 1.562 Updating crates.io index
#0 317.6 Updating git repository `https://github.com/terhechte/dioxus.git`
#0 332.3 Updating git repository `https://github.com/terhechte/navicula`
#0 334.2 Updating git repository `https://github.com/terhechte/megalodon-rs`
#0 336.8 Updating git repository `https://github.com/terhechte/cacao`
#0 340.2 error: failed to select a version for the requirement `env_logger = "^0.10.0"`
#0 340.2 candidate versions found which didn't match: 0.9.3, 0.9.2, 0.9.1, ...
#0 340.2 location searched: crates.io index
#0 340.2 required by package `ebou v0.2.0 (/app)`
------
Dockerfile:22 It seems there is a dependency issue with the package |
Rust doesn't mess with system dependencies, it stores everything locally (in the |
Same issue, env_logger still cause the build to fail |
My current guess is that it's somehow related to musl ( |
I attempted this on Linux, but the build failed. Since I'm not very familiar with Rust and I'm concerned about potentially disrupting my system dependencies, I would like to explore the possibility of setting up a Dockerfile. This would make the setup process easier on any system. I will conduct some research to see if I can find a suitable solution and submit a pull request to the repository if I discover one.
The text was updated successfully, but these errors were encountered: