forked from ocaml/opam
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbench.Dockerfile
More file actions
31 lines (31 loc) · 1.74 KB
/
bench.Dockerfile
File metadata and controls
31 lines (31 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM debian:12
RUN apt-get update -qq && apt-get install -qq -yy make curl gcc g++ patch bzip2 git unzip rsync
RUN adduser --disabled-password --gecos '' --shell /bin/bash opam
ENV OPAMREPOSHA 26770281fa1ea8b13aab979c1dfbd326e9ab512c
# 50 commits before OPAMREPOSHAPHASE1
ENV OPAMREPOSHAPHASE1DELTA 1db3104e98a25ff2b5f859189c9408dc760260e7
ENV OPAMREPOSHAPHASE1 2d85539cd05071ec4f91d6c4ee35d2adc44aa283
ENV OPAMREPOSHAPHASE3 2cd8e78594a8943245b8061dbdabd39e7ca492fb
ENV OPAMREPOSHACOMPREHENSIVE 32468d4aa3fbf7824d4bbe40b6b140490e542a19
RUN git clone https://github.com/ocaml/opam-repository /rep/opam-repository
RUN git -C /rep/opam-repository checkout $OPAMREPOSHA
RUN git clone /rep/opam-repository /rep/opam-repository-small-diff
RUN git -C /rep/opam-repository-small-diff checkout $OPAMREPOSHAPHASE1DELTA
RUN git clone --no-hardlinks /rep/opam-repository /rep/opam-repository-comprehensive-diff
RUN git -C /rep/opam-repository-comprehensive-diff checkout $OPAMREPOSHACOMPREHENSIVE
RUN git clone --bare --no-hardlinks /rep/opam-repository /rep/opam-repository.git
RUN git clone --bare --no-hardlinks /rep/opam-repository-small-diff /rep/opam-repository-small-diff.git
RUN git clone --bare --no-hardlinks /rep/opam-repository-comprehensive-diff /rep/opam-repository-comprehensive-diff.git
RUN chown -R opam:opam /rep
USER opam
COPY --chown=opam:opam . /src
WORKDIR /src
RUN make cold
USER root
RUN install ./opam /usr/local/bin/
USER opam
RUN opam init --bare -n --disable-sandboxing /rep/opam-repository
RUN opam switch create --fake default 4.14.0
RUN opam list --all -s --all-versions > /home/opam/all-packages
RUN find /rep/opam-repository -name opam -type f > /home/opam/all-opam-files
RUN cat /home/opam/all-opam-files | xargs -d '\n' cat > /home/opam/all-opam-content