TEL AVIV—Most Israelis stayed indoors to celebrate Rosh Hashana in small groups, rather than the usually large gatherings that mark the Jewish New Year holiday, as the police fined thousands of people for violating a second nationwide lockdown aimed at containing a fresh coronavirus outbreak.

A 7,000-strong police force fanned out across the country and issued 2,800 penalties over the weekend, most for people leaving their homes for nonpermitted reasons, according to a police statement Sunday. Authorities also handed out 30 fines to businesses that opened in violation of the lockdown.

Israel on Friday became the first developed country to impose a second lockdown to rein in a surge in coronavirus infections that have devastated the economy.

The restrictions come as Israel enters the high-holiday season—a period of travel and social gatherings that officials fear could further spread the virus that causes Covid-19. The lockdown is expected to last through the religious holidays of Yom Kippur and Sukkot, which ends Oct. 9. It aims to halt one of the worst daily infection rates per capita in the world: roughly 5,000 cases a day last week.

Streets across Israel on Saturday and Sunday were nearly empty of cars, with cyclists and joggers taking advantage of the vacated roads. Synagogues limited the size of congregations to 10 people, or spread out multiples of 10 in larger buildings, to comply with regulations. Worshipers gathered at the walls of the sanctuaries to listen to the services and the blowing of the ram’s horn, or shofar, a ritual during the Jewish New Year.

Israelis on social media joked that this year’s Rosh Hashana holiday—which often involves trips to family homes, parks and outdoor barbecues—felt similar to Yom Kippur, a solemn holiday when Jews are expected to fast and atone for their sins and during which roads in Israel are kept largely empty.

“What time does the fast begin?” quipped Israeli comedian Nadav Abukasis on Twitter Friday evening.

Israel became the first developed country to impose a second nationwide lockdown amid rising numbers of Covid-19 cases. As businesses were forced to close ahead of major Jewish festivals, WSJ's Dov Lieber met with restaurant owners who worried they might never reopen. Photo: Amir Cohen/Reuters

Israel’s weekslong closure is proving a challenge for Prime Minister Benjamin Netanyahu, who has faced criticism for his handling of the crisis. His political support depends on religious groups frustrated at their inability to celebrate the holiday season and a business community hurting from the lockdowns’ economic costs.

The country already is in recession. The Bank of Israel in late August estimated unemployment at 12%, after a peak at roughly 27% in May following two months of business closures because of the country’s first wave of infections.

While the number of new cases has been rising steadily across Europe for more than six weeks, Israel’s response is one of the most draconian of those countries fighting second waves of the virus. The U.K., France and other nations have imposed narrower curbs, limiting sizes of gatherings and threatening fines, hoping citizens will work to limit interaction to curb infections.

As part of the new shutdown, Israelis are permitted to roam as far as roughly half a mile from their homes, though they can travel further for necessary reasons, such as shopping for food, going to a pharmacy or a doctor, or for independent exercise.

Before the Rosh Hashana holiday, many Israelis questioned whether people would abide by the new lockdown. But police reports over the weekend showed most of the country was compliant. That could change in the coming days.

Tomer Moore, the chief executive of the Israeli Restaurant Association, said many restaurants can’t afford to close during the latest lockdown, so many owners plan to serve customers despite possibly receiving $1,500 fines. “Compliance is a luxury,” Mr. Moore said.

Lior Hargil, 52 years old, a restaurant and bar owner in Tel Aviv, said he decided to offer his annual Rosh Hashana meal for customers on Thursday—a day earlier than the start of the holiday—to avoid the lockdown. But he added that he plans to reassess the situation as the closure continues and could open his business during the lockdown to make sure that he can pay employees and keep his business afloat. “In a week we’ll see,” he said.

Since the start of the pandemic, Israel has recorded more than 183,000 infections in a population of nearly nine million.

Write to Rory Jones at rory.jones@wsj.com