Skip to content

Commit

Permalink
Use new build format (#788)
Browse files Browse the repository at this point in the history
* cleanup gambit

* remove enabled-shared

* put back PATH

* fix typos

* mroe cleanup

* more

* we need to be in the right dir

* right dir helps
  • Loading branch information
ober authored Sep 5, 2023
1 parent 512b7b3 commit 7162629
Showing 1 changed file with 6 additions and 44 deletions.
50 changes: 6 additions & 44 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
ARG distro
ARG gerbil_version
ARG gambit_version
ARG cores
ARG packages

FROM ${distro}:latest as base
ARG cores
ARG distro
ARG gerbil_version
ARG gambit_version
ARG cores
ARG packages
ENV PATH=/opt/gerbil/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
ENV GERBIL_BUILD_CORES=$cores
ENV DEBIAN_FRONTEND=noninteractive
RUN mkdir -p /src /opt
Expand Down Expand Up @@ -41,60 +40,23 @@ RUN case ${distro} in \
;; \
esac

FROM base as gambit
ARG cores
ARG distro
ARG gerbil_version
ARG gambit_version
ARG cores
ENV GAMBIT_HOME=/opt/gambit
ENV GERBIL_BUILD_CORES=$cores
ENV GERBIL_HOME=/opt/gerbil
ENV GERBIL_PATH=/src/.gerbil
ENV PATH=${GAMBIT_HOME}/bin:${GERBIL_HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
RUN git config --global url.https://github.com/.insteadOf git://github.com/
RUN cd /opt && git clone https://github.com/gambit/gambit gambit-src
RUN cd /opt/gambit-src && git fetch -a && git checkout ${gambit_version}
RUN cd /opt/gambit-src \
&& ./configure CC='gcc' \
--enable-default-runtime-options=f8,-8,t8 \
--enable-dynamic-clib \
--enable-march=native \
--enable-multiple-versions \
--enable-openssl \
--enable-poll \
--enable-single-host \
--enable-targets="" \
--enable-trust-c-tco \
CFLAGS=-foptimize-sibling-calls \
--prefix=${GAMBIT_HOME}

RUN cd /opt/gambit-src && make -j$cores
RUN cd /opt/gambit-src && make bootstrap
RUN cd /opt/gambit-src && make bootclean
RUN cd /opt/gambit-src && make -j$cores
RUN cd /opt/gambit-src && make install

FROM gambit as gerbil
FROM base as gerbil
ARG cores
ARG gerbil_version
RUN cd /opt && git clone https://github.com/vyzo/gerbil gerbil-src
ENV PATH=/opt/gambit/current/bin:$PATH
RUN cd /opt/gerbil-src && git fetch -a && git fetch --tags && git checkout ${gerbil_version} \
&& ./configure \
--prefix=${GERBIL_HOME} \
--prefix=/opt/gerbil \
--enable-leveldb \
--enable-libxml \
--enable-libyaml \
--enable-lmdb \
--enable-mysql \
--enable-zlib

RUN cd /opt/gerbil-src && make
RUN cd /opt/gerbil-src && make install
RUN cd /opt/gerbil-src && make && make install

FROM gerbil as final
RUN rm -rf /opt/gerbil-src /opt/gambit-src
RUN rm -rf /opt/gerbil-src

WORKDIR /src
CMD ["gxi"]

0 comments on commit 7162629

Please sign in to comment.