Skip to content

Commit 57d5ef2

Browse files
makefile: build nightly container image using shared container file
The new shell scripts and the single Containerfile are now capable of building either the stock "latest" image or the "nightly" rpms image. Update the makefile to do so. Signed-off-by: John Mulligan <[email protected]>
1 parent 2a4c913 commit 57d5ef2

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Makefile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ SERVER_DIR:=images/server
2323
AD_SERVER_DIR:=images/ad-server
2424
CLIENT_DIR:=images/client
2525
SERVER_SRC_FILE:=$(SERVER_DIR)/Containerfile
26-
NIGHTLY_SERVER_SRC_FILE:=$(SERVER_DIR)/Dockerfile.nightly
27-
SERVER_SOURCES:=$(SERVER_DIR)/smb.conf
26+
SERVER_SOURCES:=\
27+
$(SERVER_DIR)/smb.conf \
28+
$(SERVER_DIR)/install-packages.sh \
29+
$(SERVER_DIR)/install-sambacc.sh
2830
AD_SERVER_SRC_FILE:=$(AD_SERVER_DIR)/Containerfile
2931
AD_SERVER_SOURCES:=$(AD_SERVER_DIR)/populate.sh $(AD_SERVER_DIR)/provision.sh $(AD_SERVER_DIR)/run.sh
3032
CLIENT_SRC_FILE:=$(CLIENT_DIR)/Dockerfile
@@ -50,12 +52,18 @@ build: build-server build-nightly-server build-ad-server build-client
5052

5153
build-server: $(BUILDFILE_SERVER)
5254
$(BUILDFILE_SERVER): Makefile $(SERVER_SRC_FILE) $(SERVER_SOURCES)
53-
$(BUILD_CMD) --tag $(SERVER_NAME) --tag $(SERVER_REPO_NAME) -f $(SERVER_SRC_FILE) $(SERVER_DIR)
55+
$(BUILD_CMD) \
56+
--tag $(SERVER_NAME) --tag $(SERVER_REPO_NAME) \
57+
-f $(SERVER_SRC_FILE) $(SERVER_DIR)
5458
$(CONTAINER_CMD) inspect -f '{{.Id}}' $(SERVER_NAME) > $(BUILDFILE_SERVER)
5559

5660
build-nightly-server: $(BUILDFILE_NIGHTLY_SERVER)
57-
$(BUILDFILE_NIGHTLY_SERVER): Makefile $(NIGHTLY_SERVER_SRC_FILE) $(SERVER_SOURCES)
58-
$(BUILD_CMD) --tag $(NIGHTLY_SERVER_NAME) --tag $(NIGHTLY_SERVER_REPO_NAME) -f $(NIGHTLY_SERVER_SRC_FILE) $(SERVER_DIR)
61+
$(BUILDFILE_NIGHTLY_SERVER): Makefile $(SERVER_SRC_FILE) $(SERVER_SOURCES)
62+
$(BUILD_CMD) \
63+
--build-arg=INSTALL_PACKAGES_FROM="samba-nightly" \
64+
--build-arg=SAMBA_SPECIFICS="daemon_cli_debug_output" \
65+
--tag $(NIGHTLY_SERVER_NAME) --tag $(NIGHTLY_SERVER_REPO_NAME) \
66+
-f $(SERVER_SRC_FILE) $(SERVER_DIR)
5967
$(CONTAINER_CMD) inspect -f '{{.Id}}' $(NIGHTLY_SERVER_NAME) > $(BUILDFILE_NIGHTLY_SERVER)
6068

6169
push-server: build-server

0 commit comments

Comments
 (0)