mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 20:03:40 +00:00
fix: copy fixed Dockerfiles from release-test with OpenSSL and SKIP_INSPECTOR support
This commit is contained in:
parent
9a249de840
commit
6bfc47f234
5 changed files with 95 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# syntax=docker/dockerfile:1.10.0
|
||||
FROM rust:1.91.0
|
||||
FROM rust:1.88.0
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
llvm-14-dev \
|
||||
libclang-14-dev \
|
||||
|
|
@ -18,14 +18,17 @@ RUN apt-get update && apt-get install -y \
|
|||
RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix && \
|
||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
|
||||
# Install target
|
||||
RUN rustup target add x86_64-pc-windows-gnu
|
||||
|
||||
# Configure Cargo for Windows cross-compilation
|
||||
RUN mkdir -p /root/.cargo && \
|
||||
echo '\
|
||||
[target.x86_64-pc-windows-gnu]\n\
|
||||
linker = "x86_64-w64-mingw32-gcc"\n\
|
||||
' > /root/.cargo/config.toml
|
||||
|
||||
# Set environment variables for cross-compilation
|
||||
ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
|
||||
CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
|
||||
CXX_x86_64_pc_windows_gnu=x86_64-w64-mingw32-g++ \
|
||||
|
|
@ -36,14 +39,20 @@ ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
|
|||
CARGO_INCREMENTAL=0 \
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Copy the source code
|
||||
COPY . .
|
||||
|
||||
# Build for Windows
|
||||
# SANDBOX_AGENT_SKIP_INSPECTOR=1 skips embedding the inspector frontend
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target x86_64-pc-windows-gnu && \
|
||||
SANDBOX_AGENT_SKIP_INSPECTOR=1 cargo build -p sandbox-agent --release --target x86_64-pc-windows-gnu && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/x86_64-pc-windows-gnu/release/sandbox-agent.exe /artifacts/sandbox-agent-x86_64-pc-windows-gnu.exe
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue