Skip to content

Commit

Permalink
refactor: udpate DISK_USER and DISK_GROUP
Browse files Browse the repository at this point in the history
DISK_USER and DISK_GROUP are from #299, they are used for bib option
`--chown`. However, the current variable name may cause
misunderstanding, mislead people into thinking it's a user of operation
system inside disk, so rename them.

Also, add these 2 variables into the README.

Signed-off-by: Yihuang Yu <[email protected]>
  • Loading branch information
PaulYuuu committed Apr 29, 2024
1 parent 6367dd4 commit 2ba7c8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/common/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ SSH_PUBKEY ?= $(shell cat ${HOME}/.ssh/id_rsa.pub;)
BOOTC_IMAGE ?= quay.io/$(REGISTRY_ORG)/${APP}-bootc:latest
BOOTC_IMAGE_BUILDER ?= quay.io/centos-bootc/bootc-image-builder
DISK_TYPE ?= qcow2
DISK_USER ?= $(shell id -u)
DISK_GROUP ?= $(shell id -g)
DISK_UID ?= $(shell id -u)
DISK_GID ?= $(shell id -g)
FROM ?=
ARCH ?=
CONTAINERFILE ?= Containerfile
Expand Down Expand Up @@ -127,7 +127,7 @@ bootc-image-builder:
$(BOOTC_IMAGE_BUILDER) \
$(ARCH:%=--target-arch %) \
--type $(DISK_TYPE) \
--chown $(DISK_USER):$(DISK_GROUP) \
--chown $(DISK_UID):$(DISK_GID) \
--local \
$(BOOTC_IMAGE)

Expand Down
2 changes: 2 additions & 0 deletions recipes/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ used to override defaults for a variety of make targets.
|BOOTC_IMAGE_BUILDER | Bootc Image Builder container image | `quay.io/centos-bootc/bootc-image-builder` |
|CHROMADB_IMAGE | ChromaDB image to be used for application | `$(REGISTRY)/$(REGISTRY_ORG)/chromadb:latest` |
|DISK_TYPE | Disk type to be created by BOOTC_IMAGE_BUILDER | `qcow2` (Options: ami, iso, vmdk, raw) |
|DISK_UID | Disk UID to be specified by BOOTC_IMAGE_BUILDER | `$(shell id -u)` |
|DISK_GID | Disk GID to be specified by BOOTC_IMAGE_BUILDER | `$(shell id -g)` |
|MODEL_IMAGE | AI Model to be used by application | `$(REGISTRY)/$(REGISTRY_ORG)/mistral-7b-instruct:latest`|
|SERVER_IMAGE | AI Model Server Application | `$(REGISTRY)/$(REGISTRY_ORG)/llamacpp_python:latest` |
|SSH_PUBKEY | SSH Public key preloaded in bootc image. | `$(shell cat ${HOME}/.ssh/id_rsa.pub;)` |
Expand Down

0 comments on commit 2ba7c8f

Please sign in to comment.