Tear down old containers properly
This commit is contained in:
		
							parent
							
								
									219fbed342
								
							
						
					
					
						commit
						4a79b95efc
					
				| 
						 | 
					@ -442,7 +442,7 @@ export class Session {
 | 
				
			||||||
        // block signals. Killing the foreground process (i.e. pid1)
 | 
					        // block signals. Killing the foreground process (i.e. pid1)
 | 
				
			||||||
        // should cause the Docker runtime to bring everything else
 | 
					        // should cause the Docker runtime to bring everything else
 | 
				
			||||||
        // down in flames.
 | 
					        // down in flames.
 | 
				
			||||||
        this.container.proc.kill();
 | 
					        this.container.proc.stdin.end();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      allSessions.delete(this);
 | 
					      allSessions.delete(this);
 | 
				
			||||||
      this.ws.terminate();
 | 
					      this.ws.terminate();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,7 @@ void session(char *uuid, char *lang)
 | 
				
			||||||
  char *argv[] = {
 | 
					  char *argv[] = {
 | 
				
			||||||
    "docker",
 | 
					    "docker",
 | 
				
			||||||
    "run",
 | 
					    "run",
 | 
				
			||||||
    "--rm",
 | 
					    "--rm", "-i",
 | 
				
			||||||
    "-e", "HOME=/home/riju",
 | 
					    "-e", "HOME=/home/riju",
 | 
				
			||||||
    "-e", "HOSTNAME=riju",
 | 
					    "-e", "HOSTNAME=riju",
 | 
				
			||||||
    "-e", "LANG=C.UTF-8",
 | 
					    "-e", "LANG=C.UTF-8",
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ void session(char *uuid, char *lang)
 | 
				
			||||||
    "-e", "USERNAME=riju",
 | 
					    "-e", "USERNAME=riju",
 | 
				
			||||||
    "--hostname", "riju",
 | 
					    "--hostname", "riju",
 | 
				
			||||||
    "--name", container,
 | 
					    "--name", container,
 | 
				
			||||||
    image, "tail", "-f", "/dev/null", NULL,
 | 
					    image, "cat", NULL,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  execvp(argv[0], argv);
 | 
					  execvp(argv[0], argv);
 | 
				
			||||||
  die("execvp failed");
 | 
					  die("execvp failed");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue