@@ -5,31 +5,29 @@ FROM ocaml/opam:alpine-ocaml-4.12
55# Switch to root user so we can install apk packages
66USER root
77
8- # Add opam group
8+ ARG PUID
9+ ARG PGID
910
10- RUN addgroup -g 1004 jenkins-slave
11-
12- RUN delgroup opam nogroup
13-
14- RUN addgroup opam opam
15- RUN addgroup opam jenkins-slave
11+ RUN addgroup -g ${PGID} jenkins && \
12+ adduser -D -u ${PUID} -G jenkins jenkins
1613
1714# Set our distro_style
1815LABEL distro_style="apk"
1916
2017# Install os dependencies
21- RUN apk update && apk add build-base bzip2 git tar curl ca-certificates openssl m4 bash
18+ RUN apk update && apk --no-cache add build-base bzip2 git tar curl ca-certificates openssl m4 bash docker jq git-subtree
2219
2320# Add a recent version of the Skopeo package, which is used for looking up the correct multiarch docker image
24- RUN curl https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/containers-common-0.38.11-r0.apk -o cont.apk && \
25- curl https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/skopeo-1.3.1-r1.apk -o skopeo.apk && \
21+ # http://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/containers-common-0.38.11-r0.apk
22+ RUN curl https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/containers-common-0.44.3-r0.apk -o cont.apk && \
23+ curl https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/skopeo-1.5.2-r0.apk -o skopeo.apk && \
2624 apk add cont.apk && \
2725 apk add skopeo.apk
2826
2927# Switch back to the normal user
30- USER opam
28+ USER jenkins
3129
32- # Init opam, create and switch to 4.07 .0, update shell environment
30+ # Init opam, create and switch to 4.12 .0, update shell environment
3331RUN opam init --disable-sandboxing -y
3432RUN opam switch create 4.12.0
3533RUN opam switch 4.12.0
@@ -40,5 +38,11 @@ RUN opam repo add internet https://opam.ocaml.org
4038COPY ./scripts/install_build_deps.sh ./
4139RUN opam update; bash -x install_build_deps.sh
4240
41+ RUN opam install odoc -y
42+
4343# Specify our entrypoint
4444ENTRYPOINT [ "opam" , "config" , "exec" , "--" ]
45+
46+ # Build with:
47+ # cd stanc3
48+ # docker build -t stanorg/stanc3:staticfi --build-arg PUID=990 --progress=plain --build-arg PGID=986 -f ../ci-scripts/docker/stanc3/static/Dockerfile .
0 commit comments