1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 02:47:56 +01:00

feat: Sync from downstream (#21)

This commit is contained in:
Jason N 2024-02-28 12:33:02 -05:00 committed by GitHub
parent 76fa2f0c9e
commit f1756f7da5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 24 additions and 15 deletions

View file

@ -4,7 +4,7 @@
"name": "Existing Dockerfile", "name": "Existing Dockerfile",
// "build": { // "build": {
// "context": "..", // "context": "..",
// "dockerfile": "../Dockerfile", // "dockerfile": "../Containerfile",
// "args": { // "args": {
// "version": "39" // "version": "39"
// } // }
@ -14,3 +14,4 @@
"shutdownAction": "stopContainer", "shutdownAction": "stopContainer",
"privileged": true "privileged": true
} }

1
.gitignore vendored
View file

@ -11,3 +11,4 @@
/lorax.conf /lorax.conf
/output /output
/*.log /*.log

View file

@ -23,3 +23,4 @@ RUN dnf install -y make && make install-deps
VOLUME /build-container-installer/build VOLUME /build-container-installer/build
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

View file

@ -39,7 +39,7 @@ build/deploy.iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.t
# Step 1: Generate Lorax Templates # Step 1: Generate Lorax Templates
lorax_templates/%.tmpl: lorax_templates/%.tmpl.in lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
$(eval _VARS = IMAGE_NAME IMAGE_TAG IMAGE_REPO_DOUBLE_ESCAPED) $(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED)
$(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl $(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl
@ -99,8 +99,8 @@ clean:
rm -f $(_BASE_DIR)/*.iso || true rm -f $(_BASE_DIR)/*.iso || true
rm -f $(_BASE_DIR)/*.log || true rm -f $(_BASE_DIR)/*.log || true
install-deps: install-deps:
dnf install -y lorax xorriso podman dnf install -y lorax xorriso podman
.PHONY: clean install-deps .PHONY: clean install-deps

View file

@ -77,7 +77,7 @@ Use existing container image:
"name": "Existing Dockerfile", "name": "Existing Dockerfile",
// "build": { // "build": {
// "context": "..", // "context": "..",
// "dockerfile": "../Dockerfile", // "dockerfile": "../Containerfile",
// "args": { // "args": {
// "version": "39" // "version": "39"
// } // }
@ -95,7 +95,7 @@ Build a new container image:
"name": "Existing Dockerfile", "name": "Existing Dockerfile",
"build": { "build": {
"context": "..", "context": "..",
"dockerfile": "../Dockerfile", "dockerfile": "../Containerfile",
"args": { "args": {
"version": "39" "version": "39"
} }
@ -106,3 +106,4 @@ Build a new container image:
"privileged": true "privileged": true
} }
``` ```

View file

@ -52,3 +52,4 @@ runs:
IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \ IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \
WEB_UI=${{ inputs.web_ui }} \ WEB_UI=${{ inputs.web_ui }} \
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" "ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}"

View file

@ -22,3 +22,4 @@ mkdir /github/workspace/build || true
# Copy resulting iso to github workspace and fix permissions # Copy resulting iso to github workspace and fix permissions
cp build/deploy.iso /github/workspace/build cp build/deploy.iso /github/workspace/build
chmod -R ugo=rwX /github/workspace/build chmod -R ugo=rwX /github/workspace/build

View file

@ -1,7 +1,8 @@
append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail" append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail"
append usr/share/anaconda/interactive-defaults.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin" append usr/share/anaconda/interactive-defaults.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/interactive-defaults.ks "%end" append usr/share/anaconda/interactive-defaults.ks "%end"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%post --erroronfail" append usr/share/anaconda/post-scripts/configure_upgrades.ks "%post --erroronfail"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin" append usr/share/anaconda/post-scripts/configure_upgrades.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%end" append usr/share/anaconda/post-scripts/configure_upgrades.ks "%end"

View file

@ -1 +1,2 @@
append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${IMAGE_NAME}-${IMAGE_TAG} --transport=oci --no-signature-verification" append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${IMAGE_NAME}-${IMAGE_TAG} --transport=oci --no-signature-verification"

View file

@ -13,3 +13,4 @@ do
done done
popd > /dev/null popd > /dev/null
echo "-end" echo "-end"