Skip to content

Commit 3f230ca

Browse files
committed
Update Dockerfile
1 parent 53e4c0e commit 3f230ca

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
FROM ocaml/opam:debian-12-ocaml-5.1 AS build
22
RUN sudo apt-get update && sudo apt-get install libev-dev capnproto m4 pkg-config libsqlite3-dev libgmp-dev libzstd-dev -y --no-install-recommends
3-
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard b61304c6db353e679a36720d8b914b029d6fbc0c && opam update
3+
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard bc52affc41b55ff00c0d3ac9a376538d79695aaf && opam update
44
RUN sudo ln -sf /usr/bin/opam-2.1 /usr/bin/opam
5+
COPY --chown=opam scache/scache.opam /src/scache/
56
COPY --chown=opam solver-service.opam solver-service-api.opam /src/
67
WORKDIR /src
8+
RUN opam pin add -yn scache.dev "./scache"
79
RUN opam install -y --deps-only .
810
ADD --chown=opam . .
911
RUN opam exec -- dune build @install

dune

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
(dirs :standard \ var cache)
1+
(dirs :standard \ var)
2+
3+
(vendored_dirs scache)

dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
(lwt_eio (>= 0.5))
2727
(logs (>= 0.7.0))
2828
(fmt (>= 0.9.0))
29+
sqlite3
2930
(ocaml-version (>= 3.6.1))
3031
(solver-service-api (= :version))
3132
(dune-build-info (>= 3.8.0))

service/git_clone.ml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ module Make (Cache : CacheType) = struct
2828
let run_rm ?cwd t args =
2929
Eio.Process.run (Cache.process_mgr t) (rm_command ?cwd args)
3030

31-
let line_opt r =
32-
if Eio.Buf_read.at_end_of_input r then None
33-
else Some (Eio.Buf_read.line r)
31+
let line_opt r =
32+
if Eio.Buf_read.at_end_of_input r then None
33+
else Some (Eio.Buf_read.line r)
3434

35-
let run_git_line ?cwd t args =
36-
Eio.Process.parse_out (Cache.process_mgr t) line_opt (git_command ?cwd args)
35+
let run_git_line ?cwd t args =
36+
Eio.Process.parse_out (Cache.process_mgr t) line_opt (git_command ?cwd args)
3737

3838
let take_all_opt r =
3939
if Eio.Buf_read.at_end_of_input r then None
@@ -141,18 +141,18 @@ let run_git_line ?cwd t args =
141141
let clone_path = repo_url_to_clone_path t repo_url |> Fpath.to_string in
142142
run_git_lines t ~cwd:clone_path
143143
@@ "log"
144-
:: "--reverse"
145-
:: [ "--format=format:%H" ]
144+
:: "--reverse"
145+
:: [ "--format=format:%H" ]
146146
|> Option.value ~default:[]
147147

148148
let diff_pkgs t ~repo_url ~new_commit ~old_commit =
149149
let clone_path = repo_url_to_clone_path t repo_url |> Fpath.to_string in
150150
run_git_take_all t ~cwd:clone_path
151151
@@ "diff"
152-
:: old_commit
153-
:: new_commit
154-
:: "--"
155-
:: [ "packages" ]
152+
:: old_commit
153+
:: new_commit
154+
:: "--"
155+
:: [ "packages" ]
156156
|> function
157157
| None -> []
158158
| Some diff ->

solver-service.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ depends: [
2323
"lwt_eio" {>= "0.5"}
2424
"logs" {>= "0.7.0"}
2525
"fmt" {>= "0.9.0"}
26+
"sqlite3"
2627
"ocaml-version" {>= "3.6.1"}
2728
"solver-service-api" {= version}
2829
"dune-build-info" {>= "3.8.0"}

0 commit comments

Comments
 (0)