add rust-esp32 env
This commit is contained in:
parent
af1a8b3f76
commit
da888a3b9b
1 changed files with 10 additions and 2 deletions
12
agent
12
agent
|
|
@ -68,8 +68,16 @@ case "$env" in
|
||||||
env_layer='RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
env_layer='RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"'
|
ENV PATH="/root/.cargo/bin:${PATH}"'
|
||||||
;;
|
;;
|
||||||
|
rust-esp32)
|
||||||
|
env_suffix="-rust-esp32"
|
||||||
|
env_layer='RUN curl --proto '"'"'=https'"'"' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
RUN cargo install espup && espup install
|
||||||
|
RUN printf '"'"'#!/bin/bash\n. /root/export-esp.sh\nexec "$@"\n'"'"' > /entrypoint.sh && chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]'
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown env '$env'. Supported: rust" >&2
|
echo "Unknown env '$env'. Supported: rust, rust-esp32" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -78,7 +86,7 @@ image_name="${image_name}${env_suffix}"
|
||||||
|
|
||||||
if $rebuild || ! docker image inspect "$image_name" &>/dev/null; then
|
if $rebuild || ! docker image inspect "$image_name" &>/dev/null; then
|
||||||
echo "Building $image_name..."
|
echo "Building $image_name..."
|
||||||
dockerfile="FROM node:24-bullseye
|
dockerfile="FROM node:24-bookworm
|
||||||
${env_layer}
|
${env_layer}
|
||||||
RUN npm install -g $npm_pkg
|
RUN npm install -g $npm_pkg
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue