Skip to content
/ Docker Public

This repository contains the base Dockerfiles for compiling and running SaC programs.

License

Notifications You must be signed in to change notification settings

SacBase/Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build status docker pulls

SaC Docker

This repository contains the base Dockerfiles used for compiling and running SaC programs.

Pre-built Docker images are available on DockerHub.

Try out SaC interactively

For first time users of SaC we recommend using the Jupyter Notebook environment.

Pull the most recent image with:

docker pull sacbase/sac-jupyter-notebook

And start the Jupyter notebook using:

docker run --rm -p 8888:8888 sacbase/sac-jupyter-notebook

To access an existing notebook on your system, you can use a bind mount. Open a terminal and change directory to where your existing notebook is. Then, run the following command:

docker run --rm -p 8888:8888 -v "$(pwd):/home/jovyan/work" sacbase/sac-jupyter-notebook

The -v option tells Docker to mount your current working directory to /home/jovyan/work inside the container. By default, the Jupyter image's root directory is /home/jovyan and you can only access or save notebooks to that directory in the container.

After the container has started multiple URLs will be printed; use the one starting with 127.0.0.1:8888.

Local development with Visual Studio Code

For compiling SaC programs we recommend the sac-compiler Docker container.

Using this container with Visual Studio Code requires the Dev Containers extension. Check the documentation for a comprehensive tutorial.

In short: first add the following .devcontainer.json file to your local development directory

{
  "image": "sacbase/sac-compiler",
  "runArgs": [
    "--user", "1000:1000"
  ]
}

1000:1000 is the default for most first non-root users, but otherwise get your values with id -u and id -g.

In VS Code run the Dev Containers: Open Folder in Container... command from the Command Palette (F1).

You have now opened your local development directory within the SaC Docker container, with full access to the sac2c compiler and standard library. Happy developing!

About

This repository contains the base Dockerfiles for compiling and running SaC programs.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •