Move docker.mk to docker folder

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2021-03-17 13:30:44 +01:00
parent ff44395b31
commit ec9d296afe
2 changed files with 28 additions and 4 deletions

View File

@ -1,4 +1,16 @@
# Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
#
# 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.
DOCKER ?= docker DOCKER ?= docker
MKDIR ?= mkdir MKDIR ?= mkdir
@ -13,7 +25,7 @@ GOLANG_PKG_PATH := github.com/NVIDIA/nvidia-container-toolkit/pkg
# By default run all native docker-based targets # By default run all native docker-based targets
docker-native: docker-native:
include $(CURDIR)/docker.mk include $(CURDIR)/docker/docker.mk
binary: binary:
go build -ldflags "-s -w" -o "$(LIB_NAME)" $(GOLANG_PKG_PATH) go build -ldflags "-s -w" -o "$(LIB_NAME)" $(GOLANG_PKG_PATH)

View File

@ -1,4 +1,16 @@
# Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
#
# 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.
# Supported OSs by architecture # Supported OSs by architecture
AMD64_TARGETS := ubuntu20.04 ubuntu18.04 ubuntu16.04 debian10 debian9 AMD64_TARGETS := ubuntu20.04 ubuntu18.04 ubuntu16.04 debian10 debian9
@ -108,7 +120,7 @@ docker-build-%:
DOCKER_BUILDKIT=1 \ DOCKER_BUILDKIT=1 \
$(DOCKER) build \ $(DOCKER) build \
--progress=plain \ --progress=plain \
--build-arg BASEIMAGE=$(BASEIMAGE) \ --build-arg BASEIMAGE="$(BASEIMAGE)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg PKG_VERS="$(LIB_VERSION)" \ --build-arg PKG_VERS="$(LIB_VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \ --build-arg PKG_REV="$(PKG_REV)" \