It seems kept himself alive by licking the condensation from the side of the container.
His owner had put up missing posters but when nothing was forthcoming she feared he had been killed by a car.
Socks went missing on May 13 and was found on June 16 in a metal container (similar to a shipping containing).
The electrician who found him said:
I was just going through some stock and I saw something out the corner of my eye shuffling about. When I realised it was a cat I knew straightaway he must be in trouble as none of us had visited the unit for at least four weeks.
He was really friendly and came up to me but I realised how thin he was and was very concerned so I rang Cats Protection, and a volunteer came straight out.
I'm amazed by him and so thrilled he is doing well. I am planning to go and see him and say hello properly.
Socks was taken to a vet and put on a drip to give him fluids. His weight had plummeted to 2.1kg which is way below the ideal weight of 4kg.
The Cats Protection Leagues Arbroath branch said:
We got Socks to a vet straight away, who said it is an absolute miracle he has survived.
Cats do have a habit of sneaking into all sorts of nooks and crannies, but I've never heard of anything like this before.
Cats are remarkably resilient but to survive for over a month in those conditions it really quite amazing. We are just so happy that Socks is okay, but I hope he will be a little more cautious in the future.
His owner Michelle Maher said:
I didn't think he was coming back at all. I thought I'd lost him, I even got a new kitten because I thought he had gone
I was over-the-moon at the sight of him. I was scared to see him at first because I didn't know what kind of state he would be in but he's fine, he's a bit skinnier but he's going to make a full recovery.
I'm just going to feed him up well and give him plenty TLC.