diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..1917aca0f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM python:3.12.7 + +RUN mkdir /code +WORKDIR /code diff --git a/README.md b/README.md index 19184b400..ad96c2a24 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,26 @@ Congratulations! You're now ready to create compiled BASIC programs for your machine. Check and compile the examples included in the examples/ folder or go to the [documentation page](https://zxbasic.readthedocs.io/en/latest/) for further info. + +RUNNING WITH DOCKER +------------------- + +Build the image: + +~~~ +$ docker compose build +~~~ + +You can compile any of the provided examples, e.g.: + +~~~ +$ docker compose run --rm zxbasic examples/led.bas +~~~ + +If everything went well, a file named `led.tap` should be created. +Open it with your favourite emulator (i.e. fuse) and see the result. + + ACKNOWLEDGEMENTS --------------- diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..699f473dc --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + zxbasic: + build: . + entrypoint: ["./zxbc.py", "-taB"] + volumes: + - .:/code