mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	Merge pull request #2112 from cpuguy83/dialstdio
Add dial-stdio command
This commit is contained in:
		@@ -386,13 +386,20 @@ func (d *Driver) Rm(ctx context.Context, force, rmVolume, rmDaemon bool) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (d *Driver) Client(ctx context.Context) (*client.Client, error) {
 | 
			
		||||
func (d *Driver) Dial(ctx context.Context) (net.Conn, error) {
 | 
			
		||||
	_, conn, err := d.exec(ctx, []string{"buildctl", "dial-stdio"})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn = demuxConn(conn)
 | 
			
		||||
	return conn, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (d *Driver) Client(ctx context.Context) (*client.Client, error) {
 | 
			
		||||
	conn, err := d.Dial(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	exp, _, err := detect.Exporter()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user