Skip to content

Commit 39a6e88

Browse files
authored
Add Dockerfile for development container (#6951)
1 parent 8a28daf commit 39a6e88

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ clean:
8989

9090
clean-all: clean clean-gentype
9191

92+
dev-container:
93+
docker build -t rescript-dev-container docker
94+
9295
.DEFAULT_GOAL := build
9396

94-
.PHONY: build watch rewatch ninja bench dce test test-syntax test-syntax-roundtrip test-gentype test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean clean-all
97+
.PHONY: build watch rewatch ninja bench dce test test-syntax test-syntax-roundtrip test-gentype test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean clean-all dev-container

docker/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM rust:1.80.1-bullseye
2+
LABEL org.opencontainers.image.authors="Christoph Knittel <ck@cca.io>"
3+
LABEL org.opencontainers.image.description="Docker image for ReScript development."
4+
5+
RUN apt update && apt install -y --no-install-recommends ca-certificates curl git rsync opam musl-tools python3 python-is-python3
6+
7+
# Node.js
8+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
9+
RUN apt install -y nodejs
10+
11+
# OCaml
12+
RUN opam init -y --bare --disable-sandboxing git+https://github.com/rescript-lang/opam-repository
13+
RUN opam switch create 5.2.0 --packages ocaml-option-static
14+
RUN opam install -y dune cppo=1.6.9 js_of_ocaml-compiler=5.8.1 ocamlformat=0.26.2 ounit2=2.2.7 reanalyze=2.25.1

0 commit comments

Comments
 (0)