-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_docker.sh
executable file
·27 lines (22 loc) · 971 Bytes
/
build_docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/bash
#
# Docker Image: CentOS 7 - Python 3 and Apache/MOD_WSGI
# =============================================================================
# Build docker image
# =============================================================================
## REGISTRY="dockercentral.it.example.com:5100/"
REGISTRY="" # Docker Hub is implied.
NAMESPACE="com.example.dev"
IMAGE_NAME="centos7-python3-mod_wsgi"
TAG="3.8.r1"
DOCKERFILE=Dockerfile
FULL_IMAGE_NAME="${REGISTRY}${NAMESPACE}/${IMAGE_NAME}:${TAG}"
# Docker Registry Login
# =============================================================================
# Private Docker Registry requires a login but Docker Hub does not.
# =============================================================================
## docker login -u user@dev.example.com --password fake ${REGISTRY}
docker build -t $FULL_IMAGE_NAME ./ \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
-f ${DOCKERFILE}