-- Leo's gemini proxy

-- Connecting to miguelmurca.flounder.online:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Slightly Cursed: Running Catgirl (The IRC Client) in Docker


So Catgirl is an excellent minimalist IRC client, developed by June Bug, who also hangs around the small net.


June provided more than enough instructions to compile catgirl and its dependency, LibreTLS. However if, like me, you're not super familiar with automake, it's not obvious how to do a local installation, rather than into /usr/.


As a slightly cursed solution, I decided it was easier to write a Docker file to install Catgirl in a VM than it was risking polluting the /usr/ of my work-provided computer. Here's the Dockerfile, for future reference to myself and others:


FROM debian:latest
ENV DEBIAN_FRONTEND=noninteractive

# Install the necessary packages
RUN apt update && \
    apt install -q -y \
        manpages man-db pkg-config \
        ncurses-dev \
        git \
        libssl-dev \
        autoconf \
        make automake \
        libtool

# Install LibreTLS
WORKDIR /opt/libretls
RUN git clone https://git.causal.agency/libretls . && \
    autoreconf -fi && \
    ./configure && \
    make all && \
    make install && \
    ldconfig

# Install Catgirl IRC
WORKDIR /opt/catgirl
RUN git clone https://git.causal.agency/catgirl . && \
    ./configure && \
    make all && \
    make install

# Change into a low permissions user
RUN groupadd -r catgirl && useradd --no-log-init -r -g catgirl catgirl
USER catgirl
WORKDIR /home/catgirl

# Update Catgirl server configuration files
COPY --chown=catgirl config/ /home/catgirl/.config/catgirl/

# Run Catgirl (by default)
ENTRYPOINT ["catgirl"]

Placing this file in a folder as follows...


catgirl
  ├ Dockerfile
  └ config
     └ (catgirl config files)

... you can build the image and run it with...


docker build --tag="catgirl:latest" (location of folder outlined above)
docker run -ti catgirl (arguments)

Now, as expected, june didn't love it when I told them about this on irc.tilde.chat. They did let me know about the following, which would help in a local installation:


Install location is set by PREFIX, pkg-config tells catgirl where to find dependencies

The catgirl binary is self-contained, it doesn't have any required runtime files

The man file is a static file and could also be copied over from somewhere else

There's an undocumented uninstall make target.


I seem to remember trying to set PREFIX and running into some problems, but I don't remember what any more. Oh well, the Docker solution may be cursed, but it works fine in this situation.

-- Response ended

-- Page fetched on Sat Apr 20 11:39:55 2024