Created
December 12, 2024 16:41
-
-
Save peterhel/af3617e0ef4c3c14a206c664b98fadd9 to your computer and use it in GitHub Desktop.
After days of fighting with mingw and mac osx and an old linux laptop... this it what I finally settled with to get my rust lambda compiled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. This tells docker to use the Rust official image | |
| FROM debian | |
| SHELL ["/bin/bash", "-c"] | |
| RUN apt update && apt install python3-pip python3-venv pkg-config libssl-dev curl -y | |
| RUN python3 -m venv /venv | |
| ENV PATH="/venv/bin:/root/.cargo/bin/:$PATH" | |
| ENV RUST_BACKTRACE=1 | |
| RUN python3 -m pip install ziglang | |
| RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| RUN cargo install --locked cargo-zigbuild | |
| RUN cargo install --locked cargo-lambda | |
| WORKDIR /opt/ | |
| CMD ["cargo", "lambda", "build"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment