diff --git a/Makefile b/Makefile index aecf598..1cdc172 100644 --- a/Makefile +++ b/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) diff --git a/images/sstream-cache/Dockerfile b/images/sstream-cache/Dockerfile index 18d249d..d840a33 100644 --- a/images/sstream-cache/Dockerfile +++ b/images/sstream-cache/Dockerfile @@ -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'