What would happen to the pressure inside any enclosures on the moon as the sun hits the exterior and the temperature begins to rise?
what kind of safety feacutres could be built in to accommodate this?
The moon rotates on its axis only once in every 27 days. So, while there are about 13 24-hour periods of "day" and 13 24-hour periods of "night", there is no atmoshphere to spread the temperature around, thus meaning that when the temperature changes, it can change very quickly and by a huge, 250 degree Fahrenheit (107 C) margin!
When temperature increases, pressure increases and vise versa. So, any enclosure on the moon would have to take precautions.
Whatever precautions any permanent enclosure on the moon will ultimately take will probably be related to existing technology. Today, astronauts' spacesuits--small and mobile space enclosures--use layeres of fabric, reflective materials and internal cooling systems to combat these temperature and pressure fluctuations.
There have already been some preliminary studies done by contractors seeking NASA contracts for lunar enclosures. Some of these are available in pdf form from the NASA Technical Reports Server.
One such report recommends using liquid hydrogen cooling plates and heat-sink/radiator technology--much like the CPU on your computer is cooled using a heat sink that absorbs the heat generated by your CPU, transfers that energy to a cold plate and then allows it to radiate a way passively or with the aid of a fan.
A complete pdf copy of this report may be found at: Lunar PMAD technology assessment