
Create Dockerfile and Makefile for Ranger CLI. Changes made to CLI code to account for separate URLs for each ranger service. Minor update to flavor code to fix error detected during bandit scan. Change-Id: If787e3dda4039d8755abd5dad05cacf685113565
51 lines
1.7 KiB
Plaintext
51 lines
1.7 KiB
Plaintext
# Copyright 2018 AT&T Intellectual Property. All other 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_REGISTRY ?= quay.io
|
|
IMAGE_NAME ?= ranger-client
|
|
IMAGE_PREFIX ?= attcomdev
|
|
IMAGE_TAG ?= ocata
|
|
LABEL ?= commit-id
|
|
PROXY ?= http://proxy.foo.com:8000
|
|
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
|
USE_PROXY ?= false
|
|
|
|
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
|
|
|
|
# Build ranger Docker image for this project
|
|
.PHONY: images
|
|
images: build_$(IMAGE_NAME)
|
|
|
|
|
|
|
|
# Make targets intended for use by the primary targets above.
|
|
.PHONY: build_$(IMAGE_NAME)
|
|
build_$(IMAGE_NAME):
|
|
|
|
ifeq ($(USE_PROXY), true)
|
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f Dockerfile \
|
|
--build-arg http_proxy=$(PROXY) \
|
|
--build-arg https_proxy=$(PROXY) \
|
|
--build-arg HTTP_PROXY=$(PROXY) \
|
|
--build-arg HTTPS_PROXY=$(PROXY) \
|
|
--build-arg no_proxy=$(NO_PROXY) \
|
|
--build-arg NO_PROXY=$(NO_PROXY) .
|
|
else
|
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f Dockerfile .
|
|
endif
|
|
|
|
.PHONY: pep8
|
|
pep8:
|
|
tox -e pep8
|