Hong Kong authorities on Thursday opened 19 community centres for residents to eat inside after a virus-induced ban on indoor dining at restaurants forced many workers to have their meals outside on pavements under sweltering heat and rain.

The restaurant ban, which took effect on Wednesday, barred any outlet from allowing dine-in patrons to curb the spread of COVID-19, an unprecedented move in the financial hub where hundreds of thousands depend on eating out for daily meals.

Construction and office workers were seen across the city trying to find shade as they ate their noodle and rice lunch boxes in temperatures of up to 35 degrees Celsius (95°F).

Others opted to eat inside storerooms or even toilets, public broadcaster RTHK said.

In a prompt reversal, the government said on Thursday it would partly relax its ban on restaurant dining, noting that it brought "inconvenience and difficulties" to many workers.

From Friday, outlets will be able to open during breakfast and lunch, provided they operate at 50% capacity and ensure diners sit two to a table.

Ivan Tong, a 24-year-old engineer who was buying his takeaway lunch in the commercial district of Tsim Sha Tsui, said many industries did not have an office where workers could eat and some companies did not allow dining inside, making the restaurant ban very tough.

"Although these measures aim to lower the number of confirmed cases, it may be more dangerous as people are outside longer," Tong said.

The government's move to open centres across the city came after private businesses as varied as hairdresser salons and bus companies as well as churches provided space for the public to eat in.

One salon, Hair La Forme, posted on Facebook that it would provide water, napkins and air-conditioned toilets for free.

"Every time someone eats a meal it will be fully disinfected," it said above a photograph showing individual customer booths with leather seats and wide mirrors.