зеркало из https://github.com/docker/compose-cli.git
Use alpine as base image
Installing docker on buster is a pain, use alpine to install it
This commit is contained in:
Родитель
95e07a2134
Коммит
fe36c49246
|
@ -1,5 +1,5 @@
|
|||
# syntax = docker/dockerfile:experimental
|
||||
ARG GO_VERSION=1.14.2
|
||||
ARG GO_VERSION=1.14.3-alpine3.11
|
||||
|
||||
FROM golang:${GO_VERSION} AS base
|
||||
ARG TARGET_OS=unknown
|
||||
|
@ -7,6 +7,8 @@ ARG TARGET_ARCH=unknown
|
|||
ARG PWD=/api
|
||||
ENV GO111MODULE=on
|
||||
|
||||
RUN apk update && apk add docker make
|
||||
|
||||
WORKDIR ${PWD}
|
||||
ADD go.* ${PWD}
|
||||
RUN go mod download
|
||||
|
@ -18,9 +20,7 @@ ARG TARGET_ARCH=unknown
|
|||
ARG PWD=/api
|
||||
ENV GO111MODULE=on
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
protobuf-compiler \
|
||||
libprotobuf-dev
|
||||
RUN apk update && apk add protoc make
|
||||
|
||||
RUN go get github.com/golang/protobuf/protoc-gen-go@v1.4.1 && \
|
||||
go get golang.org/x/tools/cmd/goimports
|
||||
|
@ -52,4 +52,5 @@ FROM scratch AS cross
|
|||
COPY --from=make-cross /api/bin/* .
|
||||
|
||||
FROM base as test
|
||||
ENV CGO_ENABLED=0
|
||||
RUN make -f builder.Makefile test
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.22.0
|
||||
// protoc v3.6.1
|
||||
// protoc v3.11.2
|
||||
// source: backend/v1/backend.proto
|
||||
|
||||
package v1
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
GOOS ?= $(shell go env GOOS)
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
|
||||
PROTOS=$(shell find . -name \*.proto)
|
||||
PROTOS=$(shell find . -not \( -path ./tests -prune \) -name \*.proto)
|
||||
|
||||
EXTENSION :=
|
||||
ifeq ($(GOOS),windows)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
NAME TYPE DESCRIPTION DOCKER ENPOINT KUBERNETES ENDPOINT ORCHESTRATOR
|
||||
default docker Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://35.205.93.167 (default) swarm
|
||||
default docker Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
|
||||
example * example
|
||||
|
|
|
@ -75,7 +75,7 @@ func (sut *PsSuite) TestPs() {
|
|||
}
|
||||
|
||||
err := runPs(sut.ctx, opts)
|
||||
assert.NilError(sut.T(), err)
|
||||
assert.Nil(sut.T(), err)
|
||||
|
||||
golden.Assert(sut.T(), sut.getStdOut(), "ps-out.golden")
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ func (sut *PsSuite) TestPsQuiet() {
|
|||
}
|
||||
|
||||
err := runPs(sut.ctx, opts)
|
||||
assert.NilError(sut.T(), err)
|
||||
assert.Nil(sut.T(), err)
|
||||
|
||||
golden.Assert(sut.T(), sut.getStdOut(), "ps-out-quiet.golden")
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.22.0
|
||||
// protoc v3.6.1
|
||||
// protoc v3.11.2
|
||||
// source: cli/v1/cli.proto
|
||||
|
||||
package v1
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.22.0
|
||||
// protoc v3.6.1
|
||||
// protoc v3.11.2
|
||||
// source: compose/v1/compose.proto
|
||||
|
||||
package v1
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.22.0
|
||||
// protoc v3.6.1
|
||||
// protoc v3.11.2
|
||||
// source: containers/v1/containers.proto
|
||||
|
||||
package v1
|
||||
|
|
|
@ -264,6 +264,8 @@ func (s *store) List() ([]*Metadata, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// The default context is not stored in the store, it is in-memory only
|
||||
// so we need a special case for it.
|
||||
dockerDefault, err := dockerGefaultContext()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Загрузка…
Ссылка в новой задаче