We performed high-resolution numerical simulations of a turbulent flow driven by an oscillating uniform pressure gradient. The purpose was to investigate the influence of a reduced water depth h on the structure and dynamics of the turbulent boundary layer and the transition towards a fully turbulent flow. The study is motivated by applications of oscillatory flows, such as tides, in which h is of the same order of magnitude as the thickness of the turbulent boundary layer δ. It was found that, if h∼ δ, the turbulent flow is characterized by (1) an increase of the magnitude of the surface velocity, (2) an increase in the magnitude of the wall shear stress and (3) a phase lead of the velocity profiles, all with respect to the reference case for which h≫ δ. These results are in agreement with analytical solutions for a laminar oscillatory flow. Nevertheless, if the value of the Reynolds number is too small and h∼ δ, the flow relaminarizes.