refactor: Container-only builds for consistency

- Remove --no-container option (never build on real host)
- Simplify build.sh to always use containers
- Fix Dockerfile user permissions
- Update help text and argument parsing
- Pass arguments correctly to container builds
This commit is contained in:
2025-08-31 12:58:30 +02:00
parent 1db6185454
commit 6fbaa95725
2 changed files with 25 additions and 33 deletions

View File

@@ -27,12 +27,12 @@ RUN apk add --no-cache \
# Install musl-dev for Rust musl targeting (Alpine handles this differently than rustup)
RUN apk add --no-cache musl-dev
# Create non-root user for builds
RUN adduser -D -s /bin/bash builder && \
chown -R builder:builder /home/builder
# Create non-root user for builds matching host user
RUN adduser -D -s /bin/bash builder
# Set working directory
# Set working directory with proper permissions
WORKDIR /workspace
RUN chown builder:builder /workspace
# Set environment variables for musl static linking with Alpine's Rust
ENV RUSTFLAGS="-C target-feature=+crt-static -C linker=musl-gcc"
@@ -40,7 +40,6 @@ ENV CC="musl-gcc"
ENV TARGET_CC="musl-gcc"
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER="musl-gcc"
# Default to builder user
USER builder
# Don't switch to builder user yet - let the runtime handle it
CMD ["/bin/bash"]