Skip to content

Commit 87159c0

Browse files
authored
install ocaml in dockerfile instead of postCreate.sh (#8230)
* install ocaml in dockerfile instead of postCreate.sh * leave opam install in post create * set up opam in postcreate * install ocaml without switch * init opam with vscode user * remove manual shell setup for opam * update changelog
1 parent 4c9a002 commit 87159c0

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
1212
# Install OPAM
1313
ARG OPAM_VERSION=2.5.0
1414
RUN printf '\n\n' | bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version $OPAM_VERSION"
15+
16+
USER vscode
17+
ENV HOME=/home/vscode
18+
19+
RUN opam init -y --shell-setup --enable-shell-hook --compiler=5.3.0 --disable-sandboxing

.devcontainer/postCreate.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
#!/bin/sh
22

33
# Install dev dependencies from OPAM
4-
opam init -y --auto-setup --bare --disable-sandboxing
5-
opam switch create 5.3.0
64
opam install . --with-test --with-dev-setup -y
75

8-
# Add OPAM environment setup to shell startup script
9-
echo 'eval $(opam env)' >> ~/.zshrc
10-
echo 'eval $(opam env)' >> ~/.bashrc
11-
12-
nvm install
13-
146
corepack enable
157
printf "\n" | yarn

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#### :house: Internal
3030

31+
- speed up dev container test by installing ocaml in docker image instead of in `postCreate.sh`. https://github.com/rescript-lang/rescript/pull/8230
32+
3133
# 13.0.0-alpha.1
3234

3335
#### :boom: Breaking Change

0 commit comments

Comments
 (0)