Measurement of the dose gradients from the entrance surface to depth is a standard task for characterizing an ionizing radiation beam. Most gel dosimeters provide spurious results near an air interface, limiting their value for this geometry. In this study, a 3D dosimeter system consisting of a low-diffusion, radiochromic hydrogel cast in a custom polyethylene terephthalate (PETE) vessel and imaged with a modified commercial optical cone-beam computed tomography (CBCT) scanner was employed. The cylindrical vessel wall and flat ends were constructed from a 0.025 cm thick PETE sheet. The optical CBCT scanner was modified to place the entire vessel in the centre of the field of view or to have the vessel base at the optical axis. Pre-irradiation and post-irradiation scans were acquired with the sample mounted in the standard and elevated positions. The sample was irradiated with a 2x2 cm square, 6 MV x-ray beam. Normalized attenuation coefficients from the central quarter of the reconstructed beam images were compared to a Monte Carlo depth dose calculation. Placing the vessel base at the optical axis allowed accurate dose measurements to within 0.2 cm of the entrance face and for the standard position to within 0.4 cm. These measurements validated the Monte Carlo calculation and provide an alternative to parallel plate ion chambers for dose measurement in the build-up region.