(cache) Configurable Ubuntu release
- Allow the image build to support any Ubuntu release, default to Xenial to maintain default behavior Change-Id: Iabb54f7bdc2f6436cc8964ae9a9e971e2ce20501
This commit is contained in:
parent
ae902d8510
commit
a8887a93b4
3
Makefile
3
Makefile
@ -33,6 +33,7 @@ IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache
|
||||
BUILD_DIR := $(shell mktemp -d)
|
||||
HELM := $(BUILD_DIR)/helm
|
||||
SSTREAM_IMAGE := "https://images.maas.io/ephemeral-v3/daily/"
|
||||
SSTREAM_RELEASE := "xenial"
|
||||
UBUNTU_BASE_IMAGE ?= ubuntu:16.04
|
||||
|
||||
.PHONY: images
|
||||
@ -82,6 +83,7 @@ ifeq ($(USE_PROXY), true)
|
||||
--build-arg no_proxy=$(NO_PROXY) \
|
||||
--build-arg NO_PROXY=$(NO_PROXY) \
|
||||
--build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) \
|
||||
--build-arg SSTREAM_RELEASE=$(SSTREAM_RELEASE) \
|
||||
$(IMAGE_DIR)
|
||||
else
|
||||
docker build -t $(IMAGE) --label $(LABEL) --network=host \
|
||||
@ -91,6 +93,7 @@ else
|
||||
-f $(IMAGE_DIR)/Dockerfile \
|
||||
--build-arg FROM=$(UBUNTU_BASE_IMAGE) \
|
||||
--build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) \
|
||||
--build-arg SSTREAM_RELEASE=$(SSTREAM_RELEASE) \
|
||||
$(IMAGE_DIR)
|
||||
endif
|
||||
ifeq ($(PUSH_IMAGE), true)
|
||||
|
@ -9,7 +9,7 @@ LABEL org.opencontainers.image.vendor='The Airship Authors'
|
||||
LABEL org.opencontainers.image.licenses='Apache-2.0'
|
||||
|
||||
ARG SSTREAM_IMAGE=https://images.maas.io/ephemeral-v3/daily/
|
||||
ENV IMAGE_SRC ${SSTREAM_IMAGE}
|
||||
ARG SSTREAM_RELEASE=xenial
|
||||
|
||||
RUN apt-get -qq update && \
|
||||
apt install -y simplestreams \
|
||||
@ -19,10 +19,10 @@ RUN apt-get -qq update && \
|
||||
python-certifi --no-install-recommends \
|
||||
file
|
||||
|
||||
RUN sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg $IMAGE_SRC \
|
||||
/var/www/html/maas/images/ephemeral-v3/daily 'arch=amd64' 'release~xenial' --max=1 --progress
|
||||
RUN sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg ${SSTREAM_IMAGE} \
|
||||
/var/www/html/maas/images/ephemeral-v3/daily 'arch=amd64' "release~${SSTREAM_RELEASE}" --max=1 --progress
|
||||
|
||||
RUN sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg $IMAGE_SRC \
|
||||
RUN sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg ${SSTREAM_IMAGE} \
|
||||
/var/www/html/maas/images/ephemeral-v3/daily 'os~(grub*|pxelinux)' --max=1 --progress
|
||||
|
||||
RUN sh -c 'echo "" > /etc/apache2/ports.conf'
|
||||
|
Loading…
Reference in New Issue
Block a user