tuxman/deployments/docker/Dockerfile

24 lines
507 B
Text
Raw Normal View History

2023-06-29 15:54:24 +00:00
FROM rust:alpine AS builder-rs
2023-06-13 03:47:43 +00:00
2023-06-29 15:54:24 +00:00
COPY server/Cargo.toml server/Cargo.lock /app/
COPY server/src /app/src
2023-06-13 03:47:43 +00:00
WORKDIR /app
RUN apk add musl-dev
RUN cargo build --release
2023-06-29 15:54:24 +00:00
FROM node:alpine AS builder-ts
COPY client /app/
WORKDIR /app
2023-11-11 01:13:23 +00:00
RUN npm install typescript
2023-06-29 15:54:24 +00:00
RUN npx tsc
2023-06-13 03:47:43 +00:00
FROM alpine
RUN apk add --no-cache tini
RUN adduser -DH block
USER block
2023-06-29 15:54:24 +00:00
COPY --from=builder-rs /app/target/release/rollback /rollback
COPY --from=builder-ts /app /client
ENV CLIENT_DIR=/client
2023-06-13 03:47:43 +00:00
ENTRYPOINT ["/sbin/tini", "--", "/rollback"]