ew/docker/Dockerfile

30 lines
756 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
RUN apt update && apt install -y curl npm libssl-dev perl git
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
RUN git clone https://github.com/ethanaobrien/ew.git
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
COPY ./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"]