Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker/stanc3/debian-windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \

#Copy our script and install ocaml + init
COPY ./scripts/install_ocaml_windows.sh ./
RUN printf "\n" | bash -x install_ocaml_windows.sh "--root=/usr/local/opam --comp 4.02.3 --disable-sandboxing -y"
RUN printf "\n" | bash -x install_ocaml_windows.sh "--root=/usr/local/opam --disable-sandboxing -y"

#Copy our script and install build dependencies
COPY ./scripts/install_build_deps_windows.sh ./
Expand All @@ -24,7 +24,9 @@ RUN bash -x install_build_deps_windows.sh
# COPY ./scripts/install_dev_deps.sh ./
# RUN bash -x install_dev_deps.sh

RUN opam install -y js_of_ocaml-compiler.3.4.0 js_of_ocaml-ppx.3.4.0 js_of_ocaml.3.4.0
# Install Javascript dev environment
COPY ./scripts/install_js_deps.sh ./
RUN opam update; bash -x install_js_deps.sh

#Specify our entrypoint
ENTRYPOINT [ "opam", "config", "exec", "--" ]
2 changes: 1 addition & 1 deletion docker/stanc3/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN opam update; bash -x install_build_deps.sh
COPY ./scripts/install_dev_deps.sh ./
RUN opam update; bash -x install_dev_deps.sh

RUN opam update; opam install -y js_of_ocaml-compiler.3.4.0 js_of_ocaml-ppx.3.4.0 js_of_ocaml.3.4.0
RUN opam update

# Install Javascript dev environment
COPY ./scripts/install_js_deps.sh ./
Expand Down
26 changes: 5 additions & 21 deletions docker/stanc3/multiarch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,14 @@ RUN eval $(opam env)

# Native-code compilation not available on MIPS, fall back to bytecode
RUN if [ $(cat ./arch) = "mips64el" ]; then \
opam switch create 4.07.0+bytecode-only && opam switch 4.07.0+bytecode-only; \
opam switch create 4.12.0 --packages=ocaml-variants.4.12.0+options,ocaml-option-bytecode-only && opam switch 4.12.0; \
else \
opam switch create 4.07.0 && opam switch 4.07.0; \
opam switch create 4.12.0 && opam switch 4.12.0; \
fi

RUN eval $(opam env) && opam repo add internet https://opam.ocaml.org

# Bytecode installation not available using older menhir version with opam,
# have to manually compile menhir with necessary flags
RUN if [ $(cat ./arch) = "mips64el" ]; then \
curl https://gitlab.inria.fr/fpottier/menhir/-/archive/20181113/menhir-20181113.tar.gz --output menhir-20181113.tar.gz && \
tar -xf menhir-20181113.tar.gz && cd menhir-20181113/ && \
eval $(opam env) && opam install -y ocamlbuild ocamlfind && \
make -f Makefile PREFIX=/root/.opam/4.07.0+bytecode-only USE_OCAMLFIND=true docdir=/root/.opam/4.07.0+bytecode-only/doc/menhir libdir=/root/.opam/4.07.0+bytecode-only/lib/menhir mandir=/root/.opam/4.07.0+bytecode-only/man/man1 TARGET=byte all && \
make -f Makefile PREFIX=/root/.opam/4.07.0+bytecode-only USE_OCAMLFIND=true docdir=/root/.opam/4.07.0+bytecode-only/doc/menhir libdir=/root/.opam/4.07.0+bytecode-only/lib/menhir mandir=/root/.opam/4.07.0+bytecode-only/man/man1 TARGET=byte install; \
fi
RUN eval $(opam env) && opam repo add internet https://opam.ocaml.org

# If menhir already manually installed, then remove install command from bash script
RUN if [ $(cat ./arch) = "mips64el" ]; then \
curl https://raw.githubusercontent.com/${STANC3_ORG_ENV}/stanc3/${STANC3_BRANCH_ENV}/scripts/install_build_deps.sh | \
sed 's/menhir.20181113//' | bash; \
else \
curl https://raw.githubusercontent.com/${STANC3_ORG_ENV}/stanc3/${STANC3_BRANCH_ENV}/scripts/install_build_deps.sh | bash; \
fi
RUN curl https://raw.githubusercontent.com/${STANC3_ORG_ENV}/stanc3/${STANC3_BRANCH_ENV}/scripts/install_build_deps.sh | bash

# Cleanup
RUN rm ./arch && rm ./qarch
RUN rm ./arch && rm ./qarch
7 changes: 3 additions & 4 deletions docker/stanc3/static/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#Use Official Docker Images for OCAML/OPAM
#https://github.com/ocaml/infrastructure/wiki/Containers
FROM ocaml/opam2:alpine-3.9-ocaml-4.07
FROM ocaml/opam:alpine-ocaml-4.12

#Switch to root user so we can install apk packages
USER root

#Add opam group

RUN addgroup -g 1000 opam
RUN addgroup -g 1004 jenkins-slave

RUN delgroup opam nogroup
Expand All @@ -32,8 +31,8 @@ USER opam

#Init opam, create and switch to 4.07.0, update shell environment
RUN opam init --disable-sandboxing -y
RUN opam switch create 4.07.0
RUN opam switch 4.07.0
RUN opam switch create 4.12.0
RUN opam switch 4.12.0
RUN eval $(opam env)

RUN opam repo add internet https://opam.ocaml.org
Expand Down