forked from tfgrid/zosbuilder
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:
11
Dockerfile
11
Dockerfile
@@ -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"]
|
||||
Reference in New Issue
Block a user