iching-broker-level1/Dockerfile
Christopher Hase a4856d9619
All checks were successful
ci / build (push) Successful in 1m0s
Logging
2025-03-25 15:04:48 +01:00

35 lines
No EOL
619 B
Docker

# 1. Node.js Build-Stage
FROM node:20.18.1 AS build
RUN echo "Stage 1 startet"
WORKDIR /app
COPY package*.json ./
COPY . .
RUN npm install
RUN npx tsc # TypeScript Code kompilieren
# 2. Rust Build-Stage
RUN echo "Stage 2 startet"
FROM rust:1.74.0 AS rust-build
RUN cargo install iching
# 3. Final Node.js Runtime-Stage
FROM node:20.18.1
RUN echo "Stage 3 startet"
WORKDIR /app
# 4 Copy previous builds
COPY --from=build /app .
COPY --from=rust-build /usr/local/cargo/bin/iching /usr/local/bin/iching
RUN echo "Calling Broker"
CMD ["npx", "ts-node", "broker.ts"]
#CMD ["npx", "ts-node", "mailsender.ts"]