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

34 lines
787 B
Docker
Raw Normal View History

2023-04-16 22:20:45 +02:00
FROM rust:1.68 AS bin-builder
2023-04-16 16:04:14 +02:00
2023-04-16 22:20:45 +02:00
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install clang nettle-dev pkg-config libssl-dev -y
COPY backend .
2023-04-16 16:04:14 +02:00
RUN cargo build --release
2023-04-16 22:20:45 +02:00
FROM node:19 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 22:20:45 +02:00
FROM debian:bullseye-slim
2023-04-16 16:04:14 +02:00
2023-04-16 18:28:16 +02:00
WORKDIR /wkd
2023-04-16 22:20:45 +02:00
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
2023-04-16 18:28:16 +02:00
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" ]