浏览代码

Merge pull request #95 from docker/fix-make-protos

Fix `make protos`
Djordje Lukic 5 年之前
父节点
当前提交
f464d98f5f
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 3
      Dockerfile
  2. 2 1
      context/store/store_test.go

+ 2 - 3
Dockerfile

@@ -7,8 +7,6 @@ ARG TARGET_ARCH=unknown
 ARG PWD=/api
 ENV GO111MODULE=on
 
-RUN go get github.com/golang/protobuf/[email protected]
-
 WORKDIR ${PWD}
 ADD go.* ${PWD}
 ADD . ${PWD}
@@ -23,7 +21,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
     protobuf-compiler \
     libprotobuf-dev
 
-RUN go get github.com/golang/protobuf/[email protected]
+RUN go get github.com/golang/protobuf/[email protected] && \
+    go get golang.org/x/tools/cmd/goimports
 
 WORKDIR ${PWD}
 ADD go.* ${PWD}

+ 2 - 1
context/store/store_test.go

@@ -33,9 +33,10 @@ import (
 	"os"
 	"testing"
 
-	"github.com/docker/api/errdefs"
 	"github.com/stretchr/testify/require"
 	"github.com/stretchr/testify/suite"
+
+	"github.com/docker/api/errdefs"
 )
 
 type StoreTestSuite struct {