From 67a1579a813229ffd263bcd896307eee2fd3a38b Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 14 Aug 2024 14:35:06 +0200 Subject: [PATCH] Add Dockerfile for development container --- Makefile | 5 ++++- docker/Dockerfile | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile diff --git a/Makefile b/Makefile index 86acda755f..8bb9fd0741 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,9 @@ clean: clean-all: clean clean-gentype +dev-container: + docker build -t rescript-dev-container docker + .DEFAULT_GOAL := build -.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 +.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 diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000..b7e011e901 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,14 @@ +FROM rust:1.80.1-bullseye +LABEL org.opencontainers.image.authors="Christoph Knittel " +LABEL org.opencontainers.image.description="Docker image for ReScript development." + +RUN apt update && apt install -y --no-install-recommends ca-certificates curl git rsync opam musl-tools python3 python-is-python3 + +# Node.js +RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - +RUN apt install -y nodejs + +# OCaml +RUN opam init -y --bare --disable-sandboxing git+https://github.com/rescript-lang/opam-repository +RUN opam switch create 5.2.0 --packages ocaml-option-static +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 \ No newline at end of file