Skip to content

[docker] One more attempt to make docker-compose happen#186

Merged
lhchavez merged 3 commits intomainfrom
lh-docker-per-process-subreaper-take-three
Nov 29, 2023
Merged

[docker] One more attempt to make docker-compose happen#186
lhchavez merged 3 commits intomainfrom
lh-docker-per-process-subreaper-take-three

Conversation

@lhchavez
Copy link
Contributor

@lhchavez lhchavez commented Nov 29, 2023

Why

We had an attempt to make the reapers per-container, and that didn't
quite work. buildkit also uses bridge networking by default and that
doesn't work in Replit.

What changed

This change:

  • Now makes sure that every process creates a listener in a
    random-ish path and then inherits that to its children. No instance
    should ever stomp over the socket of another. And if a chain of
    processes set their own subprocess listeners, those are concatenated
    (although it's not strictly necessary, because setting a subreaper lower
    down the process tree should catch processes before their parents get a
    go at it).
  • Uses networking mode in buildkit by default.

Test plan

Now docker build and docker-compose up both work! (while fixing the latter, the former was broken). Also, buildkit mode works too!

Rollout

  • This is fully backward and forward compatible

@lhchavez lhchavez requested a review from a team as a code owner November 29, 2023 03:55
@lhchavez lhchavez requested review from blast-hardcheese and ryantm and removed request for a team and blast-hardcheese November 29, 2023 03:55
We had an attempt to make the reapers per-container, and that didn't
quite work.

This change now makes sure that every process creates a listener in a
random-ish path and then inherits that to its children. No instance
should ever stomp over the socket of another. And if a chain of
processes set their own subprocess listeners, those are concatenated
(although it's not strictly necessary, because setting a subreaper lower
down the process tree should catch processes before their parents get a
go at it).
@lhchavez lhchavez force-pushed the lh-docker-per-process-subreaper-take-three branch from 4475aa4 to e3d22f0 Compare November 29, 2023 14:40
Replit doesn't use bridge networking, so let's force the use of host
networking at every step of the way.
@lhchavez lhchavez force-pushed the lh-docker-per-process-subreaper-take-three branch from e3d22f0 to 60bda48 Compare November 29, 2023 15:11
@lhchavez lhchavez changed the title [docker] One more attempt to make per-container reapers [docker] One more attempt to make docker-compose happen Nov 29, 2023
@lhchavez lhchavez merged commit 25b0a6e into main Nov 29, 2023
@lhchavez lhchavez deleted the lh-docker-per-process-subreaper-take-three branch November 29, 2023 20:24
@cdmistman cdmistman mentioned this pull request Nov 29, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants