Skip to content

Commit 4bc347d

Browse files
committed
update Dockerfile and HACKING.md
1 parent 2695c02 commit 4bc347d

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM alpine:3.21 AS build
33
# Install system dependencies
44
RUN apk -U upgrade --no-cache && apk add --no-cache \
55
# to download and install Dune Developer Preview with alpine:3.21
6-
build-base patch tar ca-certificates git rsync curl sudo bash \
7-
libx11-dev nano coreutils xz wget \
6+
build-base patch tar ca-certificates git \
7+
libx11-dev coreutils xz curl bash \
88
autoconf \
99
curl-dev \
1010
gmp-dev \
@@ -13,12 +13,7 @@ RUN apk -U upgrade --no-cache && apk add --no-cache \
1313
oniguruma-dev \
1414
openssl-dev
1515

16-
# Install Dune Developer Preview
17-
# RUN curl -fsSL https://get.dune.build/install | sh
18-
# RUN /bin/bash -c 'source "/root/.local/share/dune/env/env.bash"'
19-
# ENV PATH="/root/.local/bin:$PATH"
20-
21-
RUN wget https://get.dune.build/2025-07-17/x86_64-unknown-linux-musl/dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz
16+
ADD https://get.dune.build/2025-07-17/x86_64-unknown-linux-musl/dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz .
2217
RUN tar xzf dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz
2318
RUN mkdir -p /root/.local/bin \
2419
&& mv dune-2025-07-17-x86_64-unknown-linux-musl/dune /root/.local/bin/

HACKING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ cd OCaml.org
2626

2727
Ensure you have [Dune Developer Preview](https://preview.dune.build) installed. Dune will manage the OCaml compiler along with all of the OCaml packages needed to build and run the project. By this point, we should all be using some Unix-like system (Linux, macOS, WSL2). We assume you are using the most recent version of Dune Developer Preview.
2828

29+
If you would like to build using Dune installed via `opam`, make sure to remove the `dune.lock/` directories and use the same build commands present in the Makefile, skipping `dune pkg lock`.
30+
2931
### Running the Server
3032

3133
From the root of your project, you can just build and run the project with
3234

33-
```
35+
```bash
3436
make start
3537
```
3638

@@ -110,7 +112,7 @@ before they get merged.
110112

111113
OCaml.org is using an pinned version of `opam-repository`. This is intended to protect the build from upstream regressions. The opam repository is specified in one place:
112114

113-
```
115+
```bash
114116
dune-workspace
115117
```
116118

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fmt: ## Format the codebase with ocamlformat
4040
dune build --root . --auto-promote @fmt
4141

4242
.PHONY: watch
43-
watch: ## Watch for the filesystem and rebuild on every change
43+
watch: dune.lock ## Watch for the filesystem and rebuild on every change
4444
dune build @run -w --force --no-buffer
4545

4646
.PHONY: utop

0 commit comments

Comments
 (0)