/Z80Pack-for-Docker

Z80Pack in a Docker Container

Primary LanguageDockerfile

Z80Pack in a Docker

A full installation of the Z80Pack Z80 System emulator in 50MB.

Z80Pack, by Udo Munk, is the premier Z80 System emulator, capable of emulating a variety of 8-bit systems. This is a full default installation of Z80Pack's CP/M simulator with CP/M 1, CP/M 2, CP/M 3, Fuzix and MP/M in a tiny 52mb Docker container, together with enhanced scripts to make the installation of additional software easier, and provide additional capabilities for launching CP/M. TMUX, the terminal multiplexor is also added to make running multiple versions of CP/M possible, which is particularly useful for setting up an MP/M network.

INSTALLING Z80PACK-FOR-DOCKER

Simply issue:

docker pull nculver/z80pack

RUNNING Z80PACK

This README cannot be a full tutorial on interacting with Docker containers. Here are a few useful ways to run Z80Pack.

-- DETACHED --

Perhaps the most useful is to run it in non-interactive (detached) mode so it's always available in the background as if it were a daemon.

docker run -t -d --name z80pack -p 4000-4031:4000-4031 z80pack.136 /bin/bash

You can then EXECute a command within the container like this:

docker exec -it z80pack ./cpm2

When you exit CP/M (bye typing BYE and then EXIT), the container continues to run and can be easily accessed again.

-- ONE-OFF --

You could launch a container to run a single instance of CP/M. In this case, when you exit CP/M the container will stop. You will then need to remove the container

EXTERNAL STORAGE

If you're doing serious work with Z80Pack, you will likely want your work saved externally from the container. You can mount external directories in the container as follows (if you're not running an MP/M network, the second -v command and the -p command can be discarded):

docker run -t -d
--name z80pack
-v /home/nathanael/cpm/z80pack/cpmsim/disks:/root/z80pack/cpmsim/disks
-v /home/nathanael/cpm/z80pack/cpmsim/conf:/root/z80pack/cpmsim/conf
-p 4000-4031:4000-4031
z80pack.136
/bin/bash

docker stop docker start -- to restart a stopped container

The default installation gives you the option to run several variants of CP/M. Just issue one of the following commands:

./cpm13 ./cpm14 ./cpm1975 ./cpm2 ./cpm3 ./cpm3-8080 ./fuzix ./mpm

Replacing "./bin/bash" in the docker run command above with one of these options will run that OS directly.

When running an MP/M network, you can connect directly to a client via the exposed ports. See the Z80Pack website at https://www.autometer.de/unix4fun/z80pack/ for more information.

ADDING OS'ES

In addition to the OSes included in the default installation, a wide variety of OSes is available for installation from the Z80Pack website. You can easily install any or all of these additional OSes simply by running (inside the container):

./install

and picking from a series of menus.

ENHANCED LAUNCH SCRIPTS

For each OS installed, Z80Pack includes a basic launch script that simply links the proper image files then run the simulator.

This image enhances those scripts to provide a variety of additional options.