whenfs icon indicating copy to clipboard operation
whenfs copied to clipboard

Add build instructions in Docker

Open benyanke opened this issue 1 year ago • 2 comments

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

benyanke avatar Aug 17 '24 13:08 benyanke

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"]

0n1cOn3 avatar Aug 22 '24 21:08 0n1cOn3

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.

benyanke avatar Aug 23 '24 05:08 benyanke