23 lines
507 B
Docker
23 lines
507 B
Docker
FROM rust:alpine AS builder-rs
|
|
|
|
COPY server/Cargo.toml server/Cargo.lock /app/
|
|
COPY server/src /app/src
|
|
WORKDIR /app
|
|
RUN apk add musl-dev
|
|
RUN cargo build --release
|
|
|
|
FROM node:alpine AS builder-ts
|
|
RUN npm install typescript
|
|
COPY client /app/
|
|
WORKDIR /app
|
|
RUN npx tsc
|
|
|
|
FROM alpine
|
|
RUN apk add --no-cache tini
|
|
RUN adduser -DH block
|
|
USER block
|
|
COPY --from=builder-rs /app/target/release/rollback /rollback
|
|
COPY --from=builder-ts /app /client
|
|
|
|
ENV CLIENT_DIR=/client
|
|
ENTRYPOINT ["/sbin/tini", "--", "/rollback"]
|