Skip to content

Instantly share code, notes, and snippets.

@rwcitek
Last active November 4, 2023 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwcitek/c785b754c2821b3162864e5354e78098 to your computer and use it in GitHub Desktop.
Save rwcitek/c785b754c2821b3162864e5354e78098 to your computer and use it in GitHub Desktop.
sml/nj in Docker

Installing Standard ML of New Jersey in Docker

References:

Run an interactive container

docker container run --rm -it rwcitek/smlnj sml

Build the image

Note: this should be a staged build

cat <<'eof' > /tmp/Dockerfile.smlnj
from ubuntu:22.04

run     apt-get update && \
        apt-get install -y \
          build-essential \
          curl \
          jq \
          less \
          tree \
          vim \
          wget \
          ;

workdir /usr/local/src/smlnj
run     curl -s -L https://smlnj.org/dist/working/110.99.4/config.tgz | \
           tar -xzf -
run     config/install.sh
run     install bin/sml /usr/local/bin/
workdir /tmp

copy Dockerfile.smlnj /Dockerfile 

eof

docker build --tag smlnj -f /tmp/Dockerfile.smlnj /tmp/
docker tag smlnj rwcitek/smlnj

Push to DockerHub

docker login
docker push rwcitek/smlnj

Pull from Dockerhub

docker pull rwcitek/smlnj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment