The thermodynamic, dynamic, and structural behavior of a water-like system confined in a matrix is analyzed for increasing confining geometries. The liquid is modeled by a two-dimensional associating lattice gas model that exhibits density and diffusion anomalies, similar to the anomalies present in liquid water. The matrix is a triangular lattice in which fixed obstacles impose restrictions to the occupation of the particles. We show that obstacles shorten all lines, including the phase coexistence, the critical and the anomalous lines. The inclusion of a very dense matrix not only suppresses the anomalies but also the liquid-liquid critical point.