ew/docker/Dockerfile

33 lines
732 B
Docker
Raw Normal View History

2024-07-05 15:39:30 +00:00
FROM docker.io/library/debian:latest as builder
# First - build
2024-07-03 17:27:21 +00:00
2024-07-05 17:30:21 +00:00
RUN apt update && apt install -y curl libssl-dev perl git
2024-07-03 17:27:21 +00:00
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash
RUN apt update && apt install -y nodejs
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile minimal
WORKDIR /ew/
COPY ./ ./
2024-07-03 17:27:21 +00:00
WORKDIR /ew/webui/
RUN npm i && npm run build
WORKDIR /ew/
RUN . "$HOME/.cargo/env" && cargo build --release
2024-07-05 15:39:30 +00:00
## Second - sort stuff idk
2024-07-03 17:27:21 +00:00
2024-07-05 15:39:30 +00:00
FROM docker.io/library/debian:bookworm-slim
2024-07-03 17:27:21 +00:00
2024-07-05 15:39:30 +00:00
RUN mkdir -p /root/ew/
COPY --from=builder /ew/target/release/ew /root/ew/ew
2024-07-05 15:51:57 +00:00
COPY ./docker/start.sh /root/ew/start.sh
2024-07-03 17:27:21 +00:00
2024-07-05 15:39:30 +00:00
RUN chmod +x /root/ew/start.sh
2024-07-03 17:27:21 +00:00
ENTRYPOINT ["/root/ew/start.sh"]