mirror of https://github.com/docker/compose.git
Merge pull request #1322 from chris-crone/arm
This commit is contained in:
commit
0afd3ea127
|
@ -36,7 +36,7 @@ jobs:
|
|||
|
||||
- name: Setup docker CLI
|
||||
run: |
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.2.tgz | tar xz
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
||||
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
|
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
env:
|
||||
BUILD_TAGS: kube,e2e
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.33.0
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.37.0
|
||||
make -f builder.Makefile lint
|
||||
|
||||
build:
|
||||
|
@ -51,7 +51,7 @@ jobs:
|
|||
|
||||
- name: Setup docker CLI
|
||||
run: |
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.2.tgz | tar xz
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
||||
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
|
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
|
||||
- name: Setup docker CLI
|
||||
run: |
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.2.tgz | tar xz
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
||||
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
|
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
|
||||
- name: Setup docker CLI
|
||||
run: |
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.2.tgz | tar xz
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
||||
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
||||
|
||||
- name: Setup Kube tools
|
||||
|
|
|
@ -16,13 +16,13 @@ jobs:
|
|||
|
||||
- name: Setup docker CLI
|
||||
run: |
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.2.tgz | tar xz
|
||||
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
||||
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
||||
|
||||
- name: Checkout code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
ARG GO_VERSION=1.16-alpine
|
||||
ARG GOLANGCI_LINT_VERSION=v1.33.0-alpine
|
||||
ARG GOLANGCI_LINT_VERSION=v1.37.0-alpine
|
||||
ARG PROTOC_GEN_GO_VERSION=v1.4.3
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS base
|
||||
|
|
|
@ -60,7 +60,9 @@ cli:
|
|||
.PHONY: cross
|
||||
cross:
|
||||
GOOS=linux GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-linux-amd64 ./cli
|
||||
GOOS=linux GOARCH=arm64 $(GO_BUILD) $(TAGS) -o $(BINARY)-linux-arm64 ./cli
|
||||
GOOS=darwin GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-darwin-amd64 ./cli
|
||||
GOOS=darwin GOARCH=arm64 $(GO_BUILD) $(TAGS) -o $(BINARY)-darwin-arm64 ./cli
|
||||
GOOS=windows GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-windows-amd64.exe ./cli
|
||||
|
||||
.PHONY: test
|
||||
|
@ -87,7 +89,9 @@ check-go-mod:
|
|||
package: cross
|
||||
mkdir -p dist
|
||||
tar -czf dist/docker-linux-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-linux-amd64
|
||||
tar -czf dist/docker-linux-arm64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-linux-arm64
|
||||
tar -czf dist/docker-darwin-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-darwin-amd64
|
||||
tar -czf dist/docker-darwin-arm64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-darwin-arm64
|
||||
cp $(BINARY)-windows-amd64.exe $(WORK_DIR)/docker.exe
|
||||
rm -f dist/docker-windows-amd64.zip && zip dist/docker-windows-amd64.zip -j packaging/LICENSE $(WORK_DIR)/docker.exe
|
||||
rm -r $(WORK_DIR)
|
||||
|
|
|
@ -19,16 +19,14 @@ package compose
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/docker/compose-cli/api/context/store"
|
||||
"time"
|
||||
|
||||
"github.com/compose-spec/compose-go/types"
|
||||
|
||||
"github.com/docker/compose-cli/api/compose"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/docker/compose-cli/api/client"
|
||||
"github.com/docker/compose-cli/api/compose"
|
||||
"github.com/docker/compose-cli/api/context/store"
|
||||
"github.com/docker/compose-cli/api/progress"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package compose
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/docker/compose-cli/api/client"
|
||||
|
|
|
@ -19,20 +19,19 @@ package compose
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/docker/compose-cli/api/compose"
|
||||
|
||||
"github.com/docker/compose-cli/api/progress"
|
||||
|
||||
"github.com/compose-spec/compose-go/cli"
|
||||
"github.com/compose-spec/compose-go/types"
|
||||
moby "github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/docker/compose-cli/api/compose"
|
||||
"github.com/docker/compose-cli/api/progress"
|
||||
)
|
||||
|
||||
func (s *composeService) Down(ctx context.Context, projectName string, options compose.DownOptions) error {
|
||||
|
@ -96,7 +95,7 @@ func (s *composeService) Down(ctx context.Context, projectName string, options c
|
|||
image := image
|
||||
eg.Go(func() error {
|
||||
resourceToRemove = true
|
||||
return s.removeImage(image, w, err, ctx)
|
||||
return s.removeImage(ctx, image, w)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -122,10 +121,10 @@ func (s *composeService) getServiceImages(options compose.DownOptions, projectNa
|
|||
return images
|
||||
}
|
||||
|
||||
func (s *composeService) removeImage(image string, w progress.Writer, err error, ctx context.Context) error {
|
||||
func (s *composeService) removeImage(ctx context.Context, image string, w progress.Writer) error {
|
||||
id := fmt.Sprintf("Image %s", image)
|
||||
w.Event(progress.NewEvent(id, progress.Working, "Removing"))
|
||||
_, err = s.apiClient.ImageRemove(ctx, image, moby.ImageRemoveOptions{})
|
||||
_, err := s.apiClient.ImageRemove(ctx, image, moby.ImageRemoveOptions{})
|
||||
if err == nil {
|
||||
w.Event(progress.NewEvent(id, progress.Done, "Removed"))
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue