In this paper, a variable-coefficient Davey–Stewartson (vcDS) system is investigated for modeling the evolution of a two-dimensional wave-packet on water of finite depth in inhomogeneous media or nonuniform boundaries, which is where its novelty lies. The Painlevé integrability is tested by the method of Weiss, Tabor, and Carnevale (WTC) with the simplified form of Krustal. The rational solutions are derived by the Hirota bilinear method, where the formulae of the solutions are represented in terms of determinants. Furthermore the fundamental rogue wave solutions are obtained under certain parameter restrains in rational solutions. Finally the physical characteristics of the influences of the coefficient parameters on the solutions are discussed graphically. These rogue wave solutions have comprehensive implications for two-dimensional surface water waves in the ocean.