We study a three-dimensional Bose-Einstein condensate in an isotropic harmonic trapping potential with an additional delta-correlated disorder potential at both zero and finite temperature and investigate the emergence of a Bose-glass phase for increasing disorder strength. To this end, we revisit a quite recent non-perturbative approach towards the dirty boson problem, which relies on the Hartree-Fock mean-field theory and is worked out on the basis of the replica method, and extend it from the homogeneous case to a harmonic confinement. At first, we solve the zero-temperature selfconsistency equations for the respective density contributions, which are obtained via the HartreeFock theory within the Thomas-Fermi approximation. Additionally we use a variational ansatz, whose results turn out to coincide qualitatively with those obtained from the Thomas-Fermi approximation. In particular, a first-order quantum phase transition from the superfluid phase to the Bose-glass phase is detected at a critical disorder strength, which agrees with findings in the literature. Afterwards, we consider the three-dimensional dirty boson problem at finite temperature. This allows us to study the impact of both temperature and disorder fluctuations on the respective components of the density as well as their Thomas-Fermi radii. In particular, we find that a superfluid region, a Bose-glass region, and a thermal region coexist for smaller disorder strengths. Furthermore, depending on the respective system parameters, three phase transitions are detected, namely, one from the superfluid to the Bose-glass phase, another one from the Bose-glass to the thermal phase, and finally one from the superfluid to the thermal phase.