# PDP-11 in Docker/Kubernetes ## Docker To build the container, run `docker/build.sh [tag]` with the tag you want to apply to the image. **Important:** If you want to bake a disk image into the container which will be copied into /mnt and used if no image is found there on startup, make sure to put it as `rq0.dsk` in the build directory. To run the container, use the following command adapted to your needs: docker run -d --rm --privileged --name pdp -v `pwd`/rq0.dsk:/mnt/rq0.dsk ## Kubernetes To run in Kubernetes, first you need to build the docker image (preferably with a disk baked in) and push it to a registry your cluster has access to. Once you've done that, run `./bootstrap-k8s.sh `. `tag` should be a ref to the docker image, uploaded to a registry the cluster can access. To expose the services on an external IP, first install MetalLB, and then use `./misc/configure-metallb.sh `. `ip` should be an IP address on a broadcast domain the k8s nodes are on. ### Imageless container If you built the Docker container without a baked-in image, instead of using the normal `bootstrap-k8s.sh`, you'll need to use `misc/bootstrap-k8s-imageless.sh` as follows: Run `./misc/bootstrap-k8s.sh `. `tag` should be a ref to the docker image, uploaded to a registry the cluster can access. `disk_filename` should be a gzip-compressed PDP-11 disk image, which will be extracted and attached to the pdp as rq0. ### k3s To use an external IP, MetalLB is required. Therefore, the cluster must not have ServiceLB enabled, as it will conflict. For k3s, just add `--disable=servicelb` to the server command line options. For k3d, create the cluster as follows: k3d cluster create pdp --k3s-arg "--disable=servicelb@server:*"