Browse Source

Add ARG to MAAS SimpleStream Dockerfile

This allows the simplestream repo to be passed at build time.

Change-Id: I7c854bd04366ec145f0ae5b7e3b166c2201ff740
Stacey Fletcher 10 months ago
parent
commit
8adc845af5
2 changed files with 5 additions and 3 deletions
  1. 3
    2
      Makefile
  2. 2
    1
      images/sstream-cache/Dockerfile

+ 3
- 2
Makefile View File

@@ -29,6 +29,7 @@ LABEL                      ?= commit-id
29 29
 IMAGE_NAME                 := maas-rack-controller maas-region-controller sstream-cache
30 30
 BUILD_DIR                  := $(shell mktemp -d)
31 31
 HELM                       := $(BUILD_DIR)/helm
32
+SSTREAM_IMAGE              := "https://images.maas.io/ephemeral-v3/daily/"
32 33
 
33 34
 .PHONY: images
34 35
 #Build all images in the list
@@ -64,9 +65,9 @@ helm-install:
64 65
 .PHONY: build
65 66
 build:
66 67
 ifeq ($(USE_PROXY), true)
67
-	docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) $(IMAGE_DIR)
68
+	docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) $(IMAGE_DIR)
68 69
 else
69
-	docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
70
+	docker build -t $(IMAGE) --label $(LABEL) --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
70 71
 endif
71 72
 ifeq ($(PUSH_IMAGE), true)
72 73
 	docker push $(IMAGE)

+ 2
- 1
images/sstream-cache/Dockerfile View File

@@ -1,6 +1,7 @@
1 1
 FROM ubuntu:16.04
2 2
 
3
-ENV IMAGE_SRC https://images.maas.io/ephemeral-v3/daily/
3
+ARG SSTREAM_IMAGE=https://images.maas.io/ephemeral-v3/daily/
4
+ENV IMAGE_SRC ${SSTREAM_IMAGE}
4 5
 
5 6
 RUN apt-get -qq update && \
6 7
     apt install -y simplestreams \

Loading…
Cancel
Save