Updating dockerfile

This commit is contained in:
retropikzel 2025-10-02 12:12:29 +03:00
parent 541bd64393
commit c47420b706
1 changed files with 16 additions and 8 deletions

View File

@ -1,24 +1,32 @@
FROM debian:trixie-slim AS build
RUN apt-get update && apt-get install -y make gcc chicken-bin git
RUN apt-get update && apt-get install -y gcc make git chicken-bin
RUN chicken-install r7rs
WORKDIR /build
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1 chibi
WORKDIR /build/chibi
RUN make
RUN make install
RUN make DESTDIR=/opt/compile-r7rs
RUN make DESTDIR=/opt/compile-r7rs install
RUN mkdir -p /opt/compile-r7rs/bin
RUN echo "#!/bin/sh" > /opt/compile-r7rs/bin/snow-chibi
RUN echo "PATH=/opt/compile-r7rs/usr/local/bin:${PATH} LD_LIBRARY_PATH=/opt/compile-r7rs/usr/local/lib:/opt/compile-r7rs/usr/local/lib/chibi CHIBI_MODULE_PATH=/opt/compile-r7rs/usr/local/share/chibi:/opt/compile-r7rs/usr/local/lib/chibi /opt/compile-r7rs/usr/local/bin/chibi-scheme -I /opt/compile-r7rs/usr/local/share/chibi -I /opt/compile-r7rs/usr/local/lib/chibi -I /opt/compile/snow -mchibi.snow.commands -mchibi.snow.interface -mchibi.snow.package -mchibi.snow.utils /opt/compile-r7rs/usr/local/bin/snow-chibi.scm \"\$@\"" >> /opt/compile-r7rs/bin/snow-chibi
RUN chmod +x /opt/compile-r7rs/bin/snow-chibi
ENV PATH=/opt/compile-r7rs/bin:${PATH}
WORKDIR /build
RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
RUN snow-chibi install --always-yes --impls=chicken "(foreign c)"
RUN snow-chibi install --always-yes --impls=chicken "(srfi 170)"
RUN snow-chibi install --impls=chicken --always-yes "(foreign c)"
RUN snow-chibi install --impls=chicken --always-yes "(srfi 170)"
COPY Makefile .
COPY compile-r7rs.scm .
COPY libs ./libs
RUN make PREFIX=/opt/compile-r7rs build-chicken
COPY libs libs
RUN make build-chicken
RUN make PREFIX=/opt/compile-r7rs install
FROM debian:trixie-slim
RUN apt-get update && apt-get install -y \
build-essential libffi-dev docker.io make cmake
COPY --from=build /opt/compile-r7rs /opt/compile-r7rs
ENV PATH=/opt/compile-r7rs/bin:${PATH}
RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm