Optical systems for scientific instrumentation frequently include lenses with critical mechanical requirements. Position and rotation issues of these components are inextricably bound to the efficiency of the instrument. This work describes the optomechanical design, manufacturing, assembly, and integration of the camera barrel located in the OSIRIS imager/spectrograph for the Gran Telescopio Canarias. The barrel was developed by the Instituto de Astronomía at the Universidad Nacional Autónoma de México (IA-UNAM), in collaboration with the Instituto de Astrofísica de Canarias (IAC), Spain. The camera barrel (CB) includes a set of eight lenses with their respective supports and cells, as well as two compensators: the focusing unit and the passive displacement unit, which uses the third doublet as a thermal compensator to maintain the camera's focal length and image quality with changing ambient temperature. A brief description of OSIRIS, the design criteria, optomechanical requirements, and specifications for misalignment errors and stresses are included. The camera components, analytical calculations, FEA simulations, and error budgets are also described. The iterative process of the optomechanical stages for the development of the camera are also verified and summarized. Finally, notes about fabrication, metrology, assembly, and integration are proposed as guidelines for future developments in optomechanics.