Add CARGO_HOME to dockerfile
All checks were successful
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Has been skipped
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Successful in 8m50s
Podman Rootless Demo / deploy-prod (push) Has been skipped
All checks were successful
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Has been skipped
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Successful in 8m50s
Podman Rootless Demo / deploy-prod (push) Has been skipped
This commit is contained in:
parent
4342232ebe
commit
550c4f881e
1 changed files with 10 additions and 7 deletions
|
|
@ -2,17 +2,20 @@
|
||||||
FROM docker.io/rust:1.90-slim AS wasm-builder
|
FROM docker.io/rust:1.90-slim AS wasm-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Set CARGO_HOME to ensure cargo uses our configuration
|
||||||
|
ENV CARGO_HOME=/root/.cargo
|
||||||
|
|
||||||
# Install wasm32 target and wasm-pack
|
# Install wasm32 target and wasm-pack
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
RUN cargo install wasm-pack
|
RUN cargo install wasm-pack --root /usr/local
|
||||||
|
|
||||||
# Configure cargo registry for sharenet-sh-forgejo
|
# Configure cargo registry for sharenet-sh-forgejo
|
||||||
RUN mkdir -p /root/.cargo
|
RUN mkdir -p $CARGO_HOME
|
||||||
RUN echo '[registries.sharenet-sh-forgejo]' > /root/.cargo/config.toml
|
RUN echo '[registries.sharenet-sh-forgejo]' > $CARGO_HOME/config.toml
|
||||||
RUN echo 'index = "sparse+https://git.sharenet.sh/api/packages/devteam/cargo/"' >> /root/.cargo/config.toml
|
RUN echo 'index = "sparse+https://git.sharenet.sh/api/packages/devteam/cargo/"' >> $CARGO_HOME/config.toml
|
||||||
RUN echo '' >> /root/.cargo/config.toml
|
RUN echo '' >> $CARGO_HOME/config.toml
|
||||||
RUN echo '[net]' >> /root/.cargo/config.toml
|
RUN echo '[net]' >> $CARGO_HOME/config.toml
|
||||||
RUN echo 'git-fetch-with-cli = true' >> /root/.cargo/config.toml
|
RUN echo 'git-fetch-with-cli = true' >> $CARGO_HOME/config.toml
|
||||||
|
|
||||||
# Copy WASM source and build
|
# Copy WASM source and build
|
||||||
COPY wasm/Cargo.toml wasm/Cargo.lock ./wasm/
|
COPY wasm/Cargo.toml wasm/Cargo.lock ./wasm/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue