Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
Chris Crone 2020-10-22 15:52:37 +02:00 коммит произвёл Djordje Lukic
Родитель 57a99cefbb
Коммит affdece4ad
5 изменённых файлов: 36 добавлений и 2 удалений

Просмотреть файл

@ -71,7 +71,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
# HUB
####
FROM scratch AS hub
COPY --from=build /go/src/github.com/docker/hub-tool/bin/${BINARY_NAME}_* /
ARG BINARY_NAME
COPY --from=build /go/src/github.com/docker/hub-tool/bin/${BINARY_NAME} /${BINARY_NAME}
####
# CROSS_BUILD

Просмотреть файл

@ -29,7 +29,7 @@ E2E_ENV:=--env E2E_HUB_USERNAME \
TMPDIR_WIN_PKG:=$(shell mktemp -d)
.PHONY: all
all: lint validate build test
all: build
.PHONY: build
build: ## Build the tool in a container

4
NOTICE Normal file
Просмотреть файл

@ -0,0 +1,4 @@
Docker Hub Tool
Copyright 2020 Docker Hub Tool authors
This product includes software developed at Docker, Inc. (https://www.docker.com).

Просмотреть файл

@ -1,3 +1,17 @@
# Copyright 2020 Docker Hub Tool authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include vars.mk
NULL:=/dev/null
@ -41,6 +55,7 @@ e2e:
test-unit:
$(STATIC_FLAGS) gotestsum $(shell go list ./... | grep -vE '/e2e')
.PHONY:cross
cross:
GOOS=linux GOARCH=amd64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_amd64 ./cmd/$(BINARY_NAME)
GOOS=linux GOARCH=arm64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_arm64 ./cmd/$(BINARY_NAME)

14
vars.mk
Просмотреть файл

@ -1,3 +1,17 @@
# Copyright 2020 Docker Hub Tool authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Pinned Versions
GO_VERSION=1.15.3
ALPINE_VERSION=3.12.0