https://github.com/mbg/cs325-docker
Docker image containing Clang+LLVM for the CS325 coursework
https://github.com/mbg/cs325-docker
Last synced: 2 months ago
JSON representation
Docker image containing Clang+LLVM for the CS325 coursework
- Host: GitHub
- URL: https://github.com/mbg/cs325-docker
- Owner: mbg
- Created: 2020-11-03T22:41:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-24T11:31:28.000Z (over 3 years ago)
- Last Synced: 2025-02-06T09:13:56.513Z (4 months ago)
- Language: Dockerfile
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker image for CS325
This repository contains the `Dockerfile` for a Docker image that supports building and running the CS325 coursework.
## Obtaining the Docker image
To use the pre-built image from the GitHub registry, use `docker pull`:
```
docker pull docker.pkg.github.com/mbg/cs325-docker/cs325:latest
```
You can also build the image yourself:
```
git clone https://github.com/mbg/cs325-docker
cd cs325-docker
docker build . -t cs325:latest
```## Building the compiler
To build the `mccomp` compiler, invoke `docker` as follows, ensuring to replace `/path/to/your/code` with the absolute path to your code:
```
docker run --rm -v /path/to/your/code:/code docker.pkg.github.com/mbg/cs325-docker/cs325:latest
```## Running a test
To run a test (e.g. `addition`), invoke `docker` as follows, once again ensuring to replace `/path/to/your/code` with the absolute path to your code:
```
docker run --rm -v /path/to/your/code:/code docker.pkg.github.com/mbg/cs325-docker/cs325:latest ./test.sh addition
```
Note that this assumes `mccomp` has already been built and resides in `/path/to/your/code`.## Running other commands
You can run arbitrary commands inside the container, e.g.:
```
docker run --rm -v /path/to/your/code:/code docker.pkg.github.com/mbg/cs325-docker/cs325:latest /code/mccomp /code/tests/addition/addition.c
```