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

Add build instructions in Docker #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

benyanke
Copy link

Allows folks who have not gotten a local rust tool-chain installed but have docker to do a containerized compile.

@0n1cOn3
Copy link

0n1cOn3 commented Aug 22, 2024

Wouldn't be something like that easier with a Dockerfile ?

# Use the official Rust image as the base image
FROM rust:latest

# Set the working directory inside the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . .

# Update the package list and install de pendencies
RUN apt-get update && \
    apt-get install -y libfuse3-dev

# Build the Rust project
RUN cargo build

# The final command to run the compiled binary
CMD ["./target/debug/when-fs"]

@benyanke
Copy link
Author

Perhaps, though that has a slightly different purpose and use.

The Dockerfile solution is to provide the ability to run it in a container, presumably through mounting the fuse socket.

My solution allows you to build within a container (without needing a working rust build chain setup) but then run the binary on the host directly.

Both have value though they serve different purposes.

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

Successfully merging this pull request may close these issues.

None yet

2 participants