Skip to content

Commit 13106cb

Browse files
committed
fixes dockerfiles to address change in the default OCaml version
Since now the default version 5.x most of the builds were failing (except those that were installing an explicit version of OCaml). After the update it looks like that all dockerfiles look nearly identicaly, so we should merge them in the future as only line that changes is the FROM.
1 parent 5ff468f commit 13106cb

File tree

9 files changed

+34
-62
lines changed

9 files changed

+34
-62
lines changed

docker/2.4.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ocaml/opam:debian
1+
FROM ocaml/opam:debian-ocaml-4.14
22

33
WORKDIR /home/opam
44

docker/2.5.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ocaml/opam:debian
1+
FROM ocaml/opam:debian-ocaml-4.14
22

33
WORKDIR /home/opam
44

docker/alpine/Dockerfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
FROM ocaml/opam2:alpine
1+
FROM ocaml/opam:alpine-ocaml-4.14
22

33
WORKDIR /home/opam
44

5-
RUN opam switch 4.09 \
6-
&& eval "$(opam env)" \
7-
&& opam remote set-url default https://opam.ocaml.org \
5+
RUN opam remote set-url default https://opam.ocaml.org \
86
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
97
&& opam update \
10-
&& opam depext --install bap --yes -j 1 \
11-
&& opam clean -acrs \
12-
&& rm -rf /home/opam/.opam/4.0[2-8] \
13-
&& rm -rf /home/opam/.opam/4.09/.opam-switch/sources/* \
14-
&& rm -rf /home/opam/opam-repository \
15-
&& sudo apk add py-pip \
16-
&& sudo pip install bap
8+
&& opam depext --install bap --yes -j 1
9+
1710

1811
ENTRYPOINT ["opam", "config", "exec", "--"]

docker/archlinux/Dockerfile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
1-
FROM archlinux:latest
1+
FROM ocaml/opam:archlinux-ocaml-4.14
22

3-
RUN pacman -Syu --noconfirm && pacman -S sudo --noconfirm \
4-
&& useradd -m bap \
5-
&& echo 'bap ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/bap \
6-
&& su bap
7-
8-
USER bap
9-
WORKDIR /home/bap
10-
11-
RUN sudo pacman -S --noconfirm m4 git unzip make curl wget \
12-
diffutils patch make gcc pkgconfig llvm python2 \
13-
which clang radare2 \
14-
&& wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh \
15-
&& echo "" | sudo sh install.sh \
16-
&& opam init --comp=4.09.1 --disable-sandboxing --yes \
17-
&& eval "$(opam env)" \
18-
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
19-
&& opam update \
20-
&& opam install bap --yes -j 1 \
21-
&& opam clean -acrs \
22-
&& rm -rf /home/opam/.opam/4.09.1/.opam-switch/sources/*
3+
RUN opam remote set-url default https://opam.ocaml.org \
4+
&& opam repo add bap-testing git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
5+
&& opam update \
6+
&& opam depext --install bap --yes -j 1 \
7+
&& opam clean -acrs
238

249
ENTRYPOINT ["opam", "config", "exec", "--"]

docker/debian/testing/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ocaml/opam:debian
1+
FROM ocaml/opam:debian-ocaml-4.14
22

33
WORKDIR /home/opam
44

55
RUN opam remote set-url default https://opam.ocaml.org \
6-
&& opam repo add bap-testing git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
6+
&& opam repo add bap-testing git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
77
&& opam update \
88
&& opam depext --install bap --yes -j 1 \
99
&& opam clean -acrs

docker/fedora/Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
FROM ocaml/opam2:fedora
1+
FROM ocaml/opam:fedora-ocaml-4.14
22

33
WORKDIR /home/opam
44

5-
RUN opam switch 4.09 \
6-
&& eval "$(opam env)" \
7-
&& opam remote set-url default https://opam.ocaml.org \
8-
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
5+
RUN opam remote set-url default https://opam.ocaml.org \
6+
&& opam repo add bap-testing git+https://github.com/BinaryAnalysisPlatform/opam-repository#testing --all \
97
&& opam update \
108
&& opam depext --install bap --yes -j 1 \
11-
&& opam clean -acrs \
12-
&& rm -rf /home/opam/.opam/4.0[2-8,10] \
13-
&& rm -rf /home/opam/.opam/4.09/.opam-switch/sources/* \
14-
&& rm -rf /home/opam/opam-repository
9+
&& opam clean -acrs
1510

1611
ENTRYPOINT ["opam", "config", "exec", "--"]

docker/ubuntu/bionic/Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ocaml/opam2:ubuntu-18.04
1+
FROM ocaml/opam:ubuntu-18.04-ocaml-4.14
22

33
WORKDIR /home/opam
44

@@ -7,15 +7,10 @@ RUN sudo apt-get update \
77
&& sudo add-apt-repository ppa:ivg/ghidra -y \
88
&& sudo apt-get install libghidra-dev -y \
99
&& sudo apt-get install libghidra-data -y \
10-
&& opam switch 4.09 \
11-
&& eval "$(opam env)" \
1210
&& opam remote set-url default https://opam.ocaml.org \
1311
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository --all \
1412
&& opam update \
1513
&& opam depext --install bap-extra --yes -j 1 \
16-
&& opam clean -acrs \
17-
&& rm -rf /home/opam/.opam/4.0[2-8,10] \
18-
&& rm -rf /home/opam/.opam/4.09/.opam-switch/sources/* \
19-
&& rm -rf /home/opam/opam-repository
14+
&& opam clean -acrs
2015

2116
ENTRYPOINT ["opam", "config", "exec", "--"]

docker/ubuntu/noble/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ocaml/opam:ubuntu-24.04-ocaml-4.14
2+
3+
WORKDIR /home/opam
4+
5+
RUN opam remote set-url default https://opam.ocaml.org \
6+
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository --all \
7+
&& opam update \
8+
&& opam depext --install bap --yes -j 1 \
9+
&& opam clean -acrs
10+
11+
ENTRYPOINT ["opam", "config", "exec", "--" ]

docker/ubuntu/xenial/Dockerfile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
FROM ocaml/opam2:ubuntu-16.04
1+
FROM ocaml/opam:ubuntu-16.04-ocaml-4.14
22

33
WORKDIR /home/opam
44

5-
RUN sudo apt-get update && sudo apt-get install --yes python-pip \
6-
&& opam switch 4.09 \
7-
&& eval "$(opam env)" \
8-
&& opam remote set-url default https://opam.ocaml.org \
5+
RUN opam remote set-url default https://opam.ocaml.org \
96
&& opam repo add bap git+https://github.com/BinaryAnalysisPlatform/opam-repository --all \
107
&& opam update \
118
&& opam depext --install bap --yes -j 1 \
12-
&& opam clean -acrs \
13-
&& rm -rf /home/opam/.opam/4.0[2-8,10] \
14-
&& rm -rf /home/opam/.opam/4.09/.opam-switch/sources/* \
15-
&& rm -rf /home/opam/opam-repository \
16-
&& sudo pip install bap
9+
&& opam clean -acrs
1710

1811
ENTRYPOINT ["opam", "config", "exec", "--" ]

0 commit comments

Comments
 (0)