This paper investigates the downlink transmission of reconfigurable intelligent surface (RIS)-aided cooperative non-orthogonal-multiple-access (C-NOMA), where both half-duplex (HD) and full-duplex (FD) relaying modes are considered. The system model consists of one base station (BS), two users and one RIS. The goal is to minimize the total transmit power at both the BS and at the user-cooperating relay for each relaying mode by jointly optimizing the power allocation coefficients at the BS, the transmit power coefficient at the relay user, and the passive beamforming at the RIS, subject to power budget constraints, the successive interference cancellation constraint and the minimum required quality-of-service at both cellular users. To address the high-coupled optimization variables, an efficient algorithm is proposed by invoking an alternating optimization approach that decomposes the original problem into a power allocation sub-problem and a passive beamforming sub-problem, which are solved alternately. For the power allocation sub-problem, the optimal closed-form expressions for the power allocation coefficients are derived. Meanwhile, the semi-definite relaxation approach is exploited to tackle the passive beamforming sub-problem. The simulation results validate the accuracy of the derived power control closed-form expressions and demonstrate the gain in the total transmit power brought by integrating the RIS in C-NOMA networks.