Right, it looks like you’re running the right version, so I think your path is ok.
Did you run cabal update before starting to build the cardano-node as per the example below?
# Cabal to PATH
ENV PATH="/root/.cabal/bin:${PATH}"
ENV CARDANO_VERSION="1.21.1"
WORKDIR /build/cardano-node
RUN git clone --branch ${CARDANO_VERSION} https://github.com/input-output-hk/cardano-node.git && \
cd cardano-node && \
cabal update && \
cabal build all
?