--------------------------009aeb18cffcdbe3 Content-Disposition: form-data; name="f:1" # Stage 1: Build FROM debian:stable-slim AS builder # Install build dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates build-essential wget xz-utils curl git \ libssh2-1-dev libbrotli-dev libssl-dev pkg-config && \ rm -rf /var/lib/apt/lists/* # Install Nim via choosenim ENV CHOOSENIM_NO_ANALYTICS=1 RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y ENV PATH="/root/.nimble/bin:$PATH" WORKDIR /opt/chawan # Download and extract source RUN wget https://chawan.net/dl/chawan-0-2-0-src.tar.xz && \ tar -xf chawan-0-2-0-src.tar.xz --strip-components=1 # Build and install RUN make && make install PREFIX=/usr/local # Stage 2: Runtime FROM debian:stable-slim # Install runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates libssh2-1 libbrotli1 libssl3 && \ rm -rf /var/lib/apt/lists/* # Set up environment ENV PATH="/usr/local/bin:$PATH" # Copy the main binary and the required CGI handlers COPY --from=builder /usr/local/bin/cha /usr/local/bin/chawan COPY --from=builder /usr/local/libexec/chawan /usr/local/libexec/chawan # Set entrypoint and default command ENTRYPOINT ["chawan"] CMD ["--help"] # docker build -t chawan:0.2.0 . # docker run -it --rm chawan:0.2.0 https://news.ycombinator.com/ # source: ChatFuckingGPT --------------------------009aeb18cffcdbe3--