images: Allow base image substitution for Drydock
Currently, Drydock images are built using the Ubuntu:16.04 base image. This change allows users to specify different base images using the UBUNTU_BASE_IMAGE build argument. Change-Id: I9ddaa89eb5262571703a3dbf7ebb6deed1505842
This commit is contained in:
parent
ebe95d1875
commit
ac997fd6ec
1
Makefile
1
Makefile
|
@ -18,6 +18,7 @@ IMAGE_NAME ?= drydock
|
||||||
IMAGE_PREFIX ?= airshipit
|
IMAGE_PREFIX ?= airshipit
|
||||||
IMAGE_TAG ?= dev
|
IMAGE_TAG ?= dev
|
||||||
HELM := $(shell realpath $(BUILD_DIR))/helm
|
HELM := $(shell realpath $(BUILD_DIR))/helm
|
||||||
|
UBUNTU_BASE_IMAGE ?=
|
||||||
PROXY ?= http://proxy.foo.com:8000
|
PROXY ?= http://proxy.foo.com:8000
|
||||||
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||||
USE_PROXY ?= false
|
USE_PROXY ?= false
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
FROM ubuntu:16.04
|
|
||||||
|
ARG FROM=ubuntu:16.04
|
||||||
|
FROM ${FROM}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode'
|
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode'
|
||||||
LABEL org.opencontainers.image.url='https://airshipit.org'
|
LABEL org.opencontainers.image.url='https://airshipit.org'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
UBUNTU_BASE_IMAGE=${UBUNTU_BASE_IMAGE:-""}
|
||||||
UBUNTU_REPO=${UBUNTU_REPO:-""}
|
UBUNTU_REPO=${UBUNTU_REPO:-""}
|
||||||
TRUSTED_UBUNTU_REPO=${TRUSTED_UBUNTU_REPO:-"no"}
|
TRUSTED_UBUNTU_REPO=${TRUSTED_UBUNTU_REPO:-"no"}
|
||||||
ALLOW_UNATHENTICATED=${ALLOW_UNAUTHENTICATED:-"false"}
|
ALLOW_UNATHENTICATED=${ALLOW_UNAUTHENTICATED:-"false"}
|
||||||
|
@ -9,6 +10,11 @@ PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST:-""}
|
||||||
|
|
||||||
ADDL_BUILD_ARGS=""
|
ADDL_BUILD_ARGS=""
|
||||||
|
|
||||||
|
if [[ ! -z "${UBUNTU_BASE_IMAGE}" ]]
|
||||||
|
then
|
||||||
|
ADDL_BUILD_ARGS="${ADDL_BUILD_ARGS} --build-arg FROM=${UBUNTU_BASE_IMAGE}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -z "${UBUNTU_REPO}" ]]
|
if [[ ! -z "${UBUNTU_REPO}" ]]
|
||||||
then
|
then
|
||||||
ADDL_BUILD_ARGS="${ADDL_BUILD_ARGS} --build-arg UBUNTU_REPO=${UBUNTU_REPO}"
|
ADDL_BUILD_ARGS="${ADDL_BUILD_ARGS} --build-arg UBUNTU_REPO=${UBUNTU_REPO}"
|
||||||
|
|
Loading…
Reference in New Issue