0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-12-05 03:12:50 +01:00
simple-wkd/Dockerfile
2023-04-16 22:20:45 +02:00

34 lines
No EOL
787 B
Docker

FROM rust:1.68 AS bin-builder
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install clang nettle-dev pkg-config libssl-dev -y
COPY backend .
RUN cargo build --release
FROM node:19 AS webpage-builder
COPY website .
RUN npm install -g pnpm && \
pnpm install && \
pnpm run build
COPY assets assets
RUN mv dist assets/webpage
FROM debian:bullseye-slim
WORKDIR /wkd
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install ca-certificates -y && \
rm -rf /var/lib/apt/lists/* && \
adduser --no-create-home wkd && \
chown -R wkd:wkd /wkd && \
chmod -R 777 /wkd
USER wkd
COPY --from=webpage-builder assets assets
COPY --from=bin-builder target/release/simple-wkd wkd
ENTRYPOINT [ "/wkd/wkd" ]