git @ Cat's Eye Technologies The-Cannery / 744139f
Add dockerized version of funicular with qemu-system-i386 support. Chris Pressey 1 year, 7 months ago
4 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 EXENAME=funicular
3
4 SCRIPTPATH=`realpath $0`
5 SCRIPTDIR=`dirname $SCRIPTPATH`
6 . $SCRIPTDIR/../catseye/$EXENAME/settings.sh
7 IMAGE=$ORGNAME/$EXENAME:$VERSION
8
9 docker run --user $(id -u):$(id -g) -i -t -v "${PWD}:/mnt/host" $IMAGE $EXENAME "$@"
0 FROM alpine:3.18.3
1 RUN apk update && apk add --no-cache qemu-system-i386 qemu-ui-curses cdrkit
2 RUN mkdir /mnt/host
3 WORKDIR /usr/src/app
4 COPY ./script ./script
5 ENV PATH="/usr/src/app/script:${PATH}"
6 ENV QEMU_SYSTEM_I386_FLAGS="-display curses"
7 WORKDIR /mnt/host
0 The image contains [funicular](https://catseye.tc/node/Funicular) with dependencies that allow working with funiculars for the i386 architecture (`mkisofs` and `qemu-system-i386`, with a curses interface for QEMU.)
1
2 Example of use:
3
4 docker pull catseye/funicular:0.7
5 docker run --user $(id -u):$(id -g) -i -t -v "${PWD}:/mnt/host" catseye/funicular:0.7 \
6 funicular setup
7
8 (Or, for simpler more convenient usage, use the `funicular` script in [The Cannery](https://git.catseye.tc/The-Cannery/).)
9
10 This Docker image is fairly experimental. Please don't lean on it too heavily.
11
12 The `-v "${PWD}:/mnt/host"` option in the above bind-mounts the current directory on the host to the working directory in the container. This lets the `funicular` command inside the Docker container to access your `Funicularfile` and images on your host filesystem. If you want anything more sophisticated than that, you'll have to establish more bind-mounts and translate paths between host and container as your needs dictate.
0 ORGNAME=catseye
1 SOURCE=Funicular
2 EXENAME=funicular
3 VERSION=0.7