💾 Archived View for miguelmurca.flounder.online › gemlog › 2022-01-22.gmi captured on 2023-03-20 at 17:28:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

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:

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.