Skip to content

Commit

Permalink
chore: project id args
Browse files Browse the repository at this point in the history
  • Loading branch information
Timtech4u authored May 9, 2024
1 parent 695824f commit ccb9c04
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ARG PROJECT_ID=""
FROM clux/muslrust:stable as chef
WORKDIR /siwe-oidc
RUN cargo install cargo-chef
Expand All @@ -7,14 +8,15 @@ COPY ./src/ ./src/
COPY ./Cargo.lock ./
COPY ./Cargo.toml ./
COPY ./siwe-oidc.toml ./
RUN cargo chef prepare --recipe-path recipe.json
RUN cargo chef prepare --recipe-path recipe.json

FROM chef as dep_cacher
COPY --from=dep_planner /siwe-oidc/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

FROM node:16-alpine as node_builder
ENV PROJECT_ID=""
ARG PROJECT_ID
ENV PROJECT_ID=${PROJECT_ID}
ADD --chown=node:node ./static /siwe-oidc/static
ADD --chown=node:node ./js/ui /siwe-oidc/js/ui
WORKDIR /siwe-oidc/js/ui
Expand All @@ -28,7 +30,9 @@ COPY --from=dep_planner /siwe-oidc/ ./
RUN cargo build --release

FROM alpine
COPY --from=builder /siwe-oidc/target/x86_64-unknown-linux-musl/release/siwe-oidc /usr/local/bin/
ARG PROJECT_ID
ENV PROJECT_ID=${PROJECT_ID}
COPY --from=builder /siwe-oidd/target/x86_64-unknown-linux-musl/release/siwe-oidc /usr/local/bin/
WORKDIR /siwe-oidc
RUN mkdir -p ./static
COPY --from=node_builder /siwe-oidc/static/ ./static/
Expand Down

0 comments on commit ccb9c04

Please sign in to comment.