Skip to content

Commit 6bac36d

Browse files
author
OpenNebula Community Contributor
committed
Fix generator script and Makefile for production use
- Fix docker run command: Remove backslashes to prevent 'invalid reference format' errors - Add automatic build functionality: Prompt user to build image after generation - Fix Makefile: Support appliance names with numbers (e.g., n8n) by checking SERVICES list - Simplify build instructions: Always use 'make' command for consistency - Fix volume ownership: Automatically set ownership to 1000:1000 for non-root containers These fixes ensure: 1. Generated appliances bootstrap correctly without docker errors 2. Build process works for all appliance names including those with numbers 3. Containers running as non-root users have correct permissions 4. Complete workflow from generation to built image in one command
1 parent 90aa57b commit 6bac36d

File tree

2 files changed

+131
-116
lines changed

2 files changed

+131
-116
lines changed

apps-code/community-apps/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ packer-service_Lithops: packer-service_Lithops_Worker
1919

2020
# run packer build for given distro or service
2121
$(DIR_EXPORT)/%.qcow2:
22-
$(eval DISTRO_NAME := $(shell echo $* | sed 's/[0-9].*//'))
23-
$(eval DISTRO_VER := $(shell echo $* | sed 's/^.[^0-9]*\(.*\)/\1/'))
22+
$(eval IS_SERVICE := $(filter $*,$(SERVICES)))
23+
$(eval DISTRO_NAME := $(if $(IS_SERVICE),$*,$(shell echo $* | sed 's/[0-9].*//')))
24+
$(eval DISTRO_VER := $(if $(IS_SERVICE),,$(shell echo $* | sed 's/^.[^0-9]*\(.*\)/\1/')))
2425
packer/build.sh '$(DISTRO_NAME)' '$(DISTRO_VER)' $@
2526

2627
clean:

0 commit comments

Comments
 (0)