Fix docker-classic creation makefile target

This commit is contained in:
Guillaume Tardif 2020-05-27 18:39:17 +02:00
parent cc46f84043
commit ea98a2dd78
3 changed files with 6 additions and 5 deletions

View File

@ -66,7 +66,7 @@ lint: ## run linter(s)
--target lint
classic-link: ## create docker-classic symlink if does not already exist
ln -s /usr/local/bin/docker-classic /Applications/Docker.app/Contents/Resources/bin/docker
ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker-classic
help: ## Show help
@echo Please specify a build target. The choices are:

View File

@ -186,7 +186,7 @@ func execMoby(ctx context.Context) {
// Only run original docker command if the current context is not
// ours.
if err != nil {
cmd := exec.CommandContext(ctx,"docker-classic", os.Args[1:]...)
cmd := exec.CommandContext(ctx, "docker-classic", os.Args[1:]...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr

View File

@ -29,8 +29,6 @@ package main
import (
"fmt"
. "github.com/onsi/gomega"
"github.com/stretchr/testify/suite"
"io/ioutil"
"log"
"os"
@ -40,6 +38,9 @@ import (
"testing"
"time"
. "github.com/onsi/gomega"
"github.com/stretchr/testify/suite"
"gotest.tools/golden"
. "github.com/docker/api/tests/framework"
@ -91,7 +92,7 @@ func (s *E2eSuite) TestKillChildOnCancel() {
RUN sleep 100`), 0644)).To(Succeed())
shutdown := make(chan time.Time)
errs := make(chan error)
ctx := s.NewDockerCommand("build", "--no-cache", "-t", "test-sleep-image", ".").WithinDirectory(dir).WithTimeout(shutdown)
ctx := s.NewDockerCommand("build", "--no-cache", "-t", "test-sleep-image", ".").WithinDirectory(dir).WithTimeout(shutdown)
go func() {
_, err := ctx.Exec()
errs <- err