Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 5 additions & 82 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,89 +1,12 @@
FROM mcr.microsoft.com/devcontainers/universal
# FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

RUN df -h
RUN apt-get update && apt-get -y install m4 build-essential autoconf opam libunwind-dev pkg-config

RUN rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL \
/usr/local/php /usr/local/py-utils \
/usr/local/python /usr/local/rvm /usr/local/sdkman /usr/local/share/nvm \
/opt/conda /opt/dotnet \
/home/codespace/.local/lib/python3.12
USER vscode

RUN find / -type f -exec du -h {} + | sort -rh | head -100 || true

RUN du -sh /usr/*
RUN du -sh /usr/local/*
RUN du -sh /opt/*
RUN ls -l /

RUN df -h

RUN cd /root && \
curl -L -o autoconf.tar.gz https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \
tar fxz autoconf.tar.gz && \
cd autoconf-2.71 && \
./configure --prefix=/usr && \
make && \
make install && \
cd .. && \
rm -rf autoconf-2.71 autoconf.tar.gz

ARG USERNAME=codespace
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN curl -L -o /usr/bin/opam https://github.com/ocaml/opam/releases/download/2.3.0/opam-2.3.0-i686-linux && \
chmod +x /usr/bin/opam && \
apt-get update && \
apt-get remove -y swig3.0 unixodbc-dev libpq-dev \
default-libmysqlclient-dev libgdiplus jq python3-pip sqlite3 \
libsqlite3-dev tk-dev uuid-dev clang lldb llvm gdb vim-doc xtail \
libsecret-1-dev && \
apt-get install -y imagemagick && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN df -h

USER ${USERNAME}

# CR mshinwell/avsm: use a hash for --repos, but will need to restore the
# URL afterwards for any user opam update commands.
RUN opam init -a --disable-sandboxing --yes --bare && \
opam update -a && \
opam switch create 5.2.0+ox --yes \
--repos "ox=git+https://github.com/oxcaml/opam-repository.git,default" && \
eval $(opam env --switch 5.2.0+ox)

RUN df -h

RUN eval $(opam env --switch 5.2.0+ox) && \
opam install -j 1 --yes ocamlformat && \
opam clean

RUN df -h

RUN eval $(opam env --switch 5.2.0+ox) && \
opam install -j 1 --yes merlin && \
opam clean

RUN df -h

RUN eval $(opam env --switch 5.2.0+ox) && \
opam install -j 1 --yes async && \
opam clean

RUN df -h

RUN eval $(opam env --switch 5.2.0+ox) && \
opam install -j 1 --yes ocaml-lsp-server && \
opam clean

RUN df -h

RUN eval $(opam env --switch 5.2.0+ox) && \
opam install --yes utop && \
opam install --yes parallel && \
opam install --yes core_unix
--repos "ox=git+https://github.com/oxcaml/opam-repository.git,default"

USER root
RUN opam install -y ocamlformat merlin ocaml-lsp-server odoc utop core parallel && opam clean -a
9 changes: 2 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"build": {
"dockerfile": "Dockerfile"
},
//"image": "ghcr.io/oxcaml/playground@sha256:6d10fa7419881cec63d934956de1d662dbbf3d80bde47cc14a132506022db58c",
"image": "ghcr.io/avsm/playground:main",
"name": "OxCaml Playground",
"userEnvProbe": "loginInteractiveShell",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -12,8 +10,5 @@
"eamodio.gitlens"
]
}
},
"hostRequirements": {
"storage": "64gb"
}
}
109 changes: 0 additions & 109 deletions .github/workflows/docker-publish.yml

This file was deleted.

Loading