0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-10-30 05:05:52 +01:00
simple-wkd/Dockerfile

29 lines
594 B
Docker
Raw Normal View History

2023-04-16 18:28:16 +02:00
FROM rust:1.68-alpine3.17 AS bin-builder
2023-04-16 16:04:14 +02:00
2023-04-16 19:19:21 +02:00
COPY backend backend
COPY Cargo.lock .
COPY Cargo.toml .
2023-04-16 18:28:16 +02:00
RUN apk add --no-cache openssl-dev musl-dev
2023-04-16 16:04:14 +02:00
RUN cargo build --release
2023-04-16 18:28:16 +02:00
FROM node:19-alpine3.17 AS webpage-builder
2023-04-16 16:04:14 +02:00
COPY website .
RUN npm install -g pnpm && \
pnpm install && \
pnpm run build
COPY assets assets
RUN mv dist assets/webpage
2023-04-16 18:28:16 +02:00
FROM alpine:3.17
2023-04-16 16:04:14 +02:00
2023-04-16 18:28:16 +02:00
WORKDIR /wkd
RUN adduser --no-create-home --disabled-password wkd && \
chown -R wkd:wkd /wkd
USER wkd
2023-04-16 16:04:14 +02:00
COPY --from=webpage-builder assets assets
2023-04-16 18:28:16 +02:00
COPY --from=bin-builder target/release/simple-wkd wkd
ENTRYPOINT [ "/wkd/wkd" ]