# Seq Demo - Simple Dockerfile
FROM ubuntu:24.04 AS builder
# Install dependencies and Rust
RUN apt-get update \
&& apt-get install -y curl ca-certificates build-essential clang \
&& rm -rf /var/lib/apt/lists/* \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install seq-compiler and build
RUN cargo install seq-compiler
WORKDIR /app
COPY main.seq .
RUN seqc main.seq --output /app/seq-demo
# Runtime
FROM ubuntu:24.04
RUN apt-get update \
&& apt-get install -y socat \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/seq-demo /app/seq-demo
COPY static/ /app/static/
EXPOSE 5000
# seq-demo binds to localhost only, use socat to expose externally
CMD /app/seq-demo & socat TCP-LISTEN:5000,fork,reuseaddr TCP:127.0.0.1:8080