You can pull this image from Docker Hub.
docker pull cmiles74/docker-sheepshaver
Last week I was cleaning out my office and I found an old clamshell iBook from way back in 1999. It powers up but the CD-ROM drive is dead and although it has a USB port, it doesn't want to boot from it. I put it on the shelf in case I come across a replacement CD-ROM drive, but after that I kept thinking about those days on that laptop with Mac OS 9, working as a web developer doing mostly HTML, PHP and a little bit of JavaScript. And then I found SheepShaver!
This image provides a Debian Wheezy image with a working instance of the
SheepShaver PowerPC emulator, all ready to run your favorite Classic MacOS
version (9.0.2 back to the late 7 series.) It's not perfect but it seemed to
play Marathon okay. ;-)
This image comes with a handy "run" script that will probably do everything that you need. It allows X11 access to the docker user, provides access to your audio interfaces and runs Docker in "privileged mode". We need privilege mode so that it can get access to your network adapter (more on that later).
Take a look at this script, you'll need to customize the variables at the top so that it does what you want. I'm not going to go through a complete setup here (you can find more information on Emaculation.com), but here are some important details...
The SS_DATA_PATH
variable should point to a directory on your local machine
somewhere that will contain all your SheepShaver related data, like the items
details below. The SS_EXTFS
variable should point to a directory on your local
machine where you will swap files with the SheepShaver environment. I've found
SheepShaver to be a little finicky about what files and directories it's willing
to show (I think it has issues with characters in the files, perhaps), so I have
been pointing it to a single directory.
SheepShaver needs a copy of a Macintosh ROM file. In my experience, it won't work with any ROM file that was created after then end of 1999 (anything from 2000 onwards won't work.) You can find some of these ROM files on the internet.
Sheepshaver can create a hard drive file for you through it's GUI interface. After you get your drive created and everything running the way you like it, it may make sense to set the flag to hide the GUI at launch time.
Lastly, you'll need an ISO (or ".toast") file with the installation media. You can mount that in SheepShaver and your emulated Macintosh will boot from it. You can find Mac OS 9 images on the internet that will work, but make sure the image file is not writeable! If the file is writeable, the emulated Macintosh will complain that it's a copy and refuse to boot.
SheepShaver requires a custom kernel module that creates a new network device in order to allow network access for the emulated Macintosh. Since I have no idea what kernel version you are running I can't create this module for you ahead of time. Lucky for you, it's pretty easy to create the module yourself. Firstly, you'll need to check out the source code for SheepShaver.
git clone https://github.com/cebix/macemu
Instructions for compiling and installing it are available as well. I followed those instructions step-by-step and it worked well.
SheepShaver has several options for connecting to your network devices. I myself have only had success with the "slirp" interface, but your mileage may vary.
I don't have a lot of tips, if SheepShaver doesn't work you're pretty much at the mercy of the internet and old message boards. But I did notice one thing: try turning the GUI off. If I leave the GUI on, I'll get a solid black screen. If I turn the GUI off and rely on the command line parameters, SheepShaver will boot just fine.
Good luck! :-D
You might be wondering, since you have all of the source code checked out anyway, why don't you just compile the whole thing? Well, SheepShaver requires the GCC compiler, version 4.6 and if you check your workstation out, you'll see it's running 6.x.x or newer.
gcc --version
Under anything newer that 4.6, the project will fail to compile. You could install that old version of GCC, but you'll run into other problems (ABI changes, etc.) The best plan is to run the application in the environment it expects (something old like Debian Wheezy). The kernel module will compile with a recent GCC and lo and hehold, everything works pretty well.