Skip to content

Instantly share code, notes, and snippets.

@EduardoRFS
Last active January 3, 2020 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EduardoRFS/de84d45955b7e19d7d0ddc694785a38c to your computer and use it in GitHub Desktop.
Save EduardoRFS/de84d45955b7e19d7d0ddc694785a38c to your computer and use it in GitHub Desktop.
FROM archlinux
ENV OPAMYES=true
RUN pacman -Sy --noconfirm base-devel awk m4 git unzip perl wget nodejs npm yarn
RUN curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh | sh
RUN useradd -m updatebs
USER updatebs
RUN opam init --disable-sandboxing --bare
RUN opam switch create 4.06.1; opam switch 4.06.1
RUN eval $(opam env); opam install js_of_ocaml.3.5.1 camlp4 ocamlfind
WORKDIR /home/updatebs
RUN git clone https://github.com/BuckleScript/bucklescript.git
WORKDIR /home/updatebs/bucklescript
RUN git submodule update --init && node scripts/buildocaml.js
RUN node scripts/ninja.js config && node scripts/ninja.js build
RUN yarn
RUN yarn link
WORKDIR /home/updatebs
RUN git clone https://github.com/reasonml/reason-react.git
WORKDIR /home/updatebs/reason-react
RUN yarn
RUN yarn link
RUN yarn link bs-platform
WORKDIR /home/updatebs
RUN git clone https://github.com/reasonml/reasonml.github.io.git
WORKDIR /home/updatebs/bucklescript
RUN eval $(opam env); BS_PLAYGROUND=../../reasonml.github.io/website/playground/bs node scripts/repl.js
WORKDIR /home/updatebs/reasonml.github.io/website
USER root
RUN yarn
RUN chown -R updatebs:updatebs .
USER updatebs
RUN yarn link reason-react
RUN yarn link bs-platform
RUN yarn prepare
RUN ln -s /home/updatebs/bucklescript /home/updatebs/bs-platform
RUN node setupSomeArtifacts.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment