Skip to content

Instantly share code, notes, and snippets.

@rikatz
Last active April 2, 2026 16:05
Show Gist options
  • Select an option

  • Save rikatz/1135c311d86306a5bff3e39276968b17 to your computer and use it in GitHub Desktop.

Select an option

Save rikatz/1135c311d86306a5bff3e39276968b17 to your computer and use it in GitHub Desktop.
Coderabbit CLI on a Docker container

Coderabbit CLI docker image

This is coderabbit CLI docker image. It can be used to run coderabbit locally without pushing a PR

Quickstart

  • Build the image
docker build --build-arg USER_UID=$(id -u) -t coderabbit .
  • Authenticate on Coderabbit (execute just once)
mkdir -p $HOME/.coderabbit
docker run -it -v $HOME/.coderabbit/:/home/c:oderabbit/.coderabbit/ coderabbit auth login
  • Use coderabbit, on a directory that is a git repository

Change the "base" arg below to your branch base (eg.: if it is main you can skip it)

docker run -it -v $HOME/.coderabbit/:/home/coderabbit/.coderabbit/ -v $(pwd):/workdir  coderabbit review --plain --base master
FROM fedora:43
ARG USER_UID=1001
RUN dnf -y install unzip git \
&& curl -fsSL https://cli.coderabbit.ai/install.sh > /tmp/coderabbit.sh \
&& /bin/sh /tmp/coderabbit.sh \
&& mv $HOME/.local/bin/coderabbit /bin/coderabbit \
&& git config --system --add safe.directory /workdir \
&& useradd -u ${USER_UID} -m coderabbit \
&& mkdir /workdir && chown -R ${USER_UID} /workdir
USER ${USER_UID}
WORKDIR /workdir
ENTRYPOINT ["/bin/coderabbit"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment