DONETSK, Ukraine — With Ukraine’s military tightening a cordon around this city controlled by separatist rebels, Oleg Grishin found himself enlisted on Monday in one of their schemes for its defense: the forced labor of drunks, drug addicts and curfew violators to dig trenches and build barriers.

Sweat streaked his face. Yet with a militant commander standing nearby, he had no complaints about the stooped toiling in the sun. “What can I say, I was drunk, I was guilty, they are right,” he mumbled.

Donetsk, the rebel capital, is now isolated by the siege, which the Ukrainian Army managed to achieve over the weekend. Government troops appear to have closed a gap in the encirclement with fighting over the past week near the wreckage of Malaysia Airlines Flight 17, which was shot down last month, despite appeals by international monitors to refrain from combat near the wreckage and still uncollected remains of some victims.

Encircled, Donetsk is now the main redoubt of the pro-Russian insurgency. It is an apprehensive place.