mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-10-30 03:05:51 +01:00
31 lines
815 B
Docker
31 lines
815 B
Docker
FROM rust:1.68 AS bin-builder
|
|
|
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
|
apt-get update && \
|
|
apt-get install clang llvm pkg-config nettle-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 /simplewkd
|
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
|
apt-get update && \
|
|
apt-get install clang llvm pkg-config nettle-dev -y && \
|
|
rm -rf /var/lib/apt/lists/* && adduser --no-create-home simplewkd && \
|
|
chown -R simplewkd:simplewkd /simplewkd && \
|
|
chmod -R 777 /simplewkd
|
|
USER simplewkd
|
|
COPY --from=webpage-builder assets assets
|
|
COPY --from=bin-builder target/release/simple-wkd simple-wkd
|