diff --git a/Dockerfile b/Dockerfile index 78aa668e..48433412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,23 @@ +ARG LUET_VERSION=0.16.7 +FROM quay.io/luet/base:$LUET_VERSION AS luet + FROM registry.suse.com/suse/sle15:15.3 AS base + +# Copy luet from the official images +COPY --from=luet /usr/bin/luet /usr/bin/luet + ARG ARCH=amd64 ENV ARCH=${ARCH} -ENV LUET_VERSION 0.16.7 RUN zypper rm -y container-suseconnect RUN zypper ar --priority=200 http://download.opensuse.org/distribution/leap/15.3/repo/oss repo-oss RUN zypper --no-gpg-checks ref COPY files/etc/luet/luet.yaml /etc/luet/luet.yaml -RUN zypper in -y curl -RUN curl -sfL -o /usr/bin/luet https://github.com/mudler/luet/releases/download/${LUET_VERSION}/luet-${LUET_VERSION}-linux-${ARCH} && \ - chmod +x /usr/bin/luet FROM base as tools -RUN zypper in -y docker squashfs xorriso +ENV LUET_NOLOCK=true +RUN zypper in -y squashfs xorriso COPY tools / -RUN luet install -y repository/luet repository/mocaccino-repository-index -RUN luet install -y extension/makeiso +RUN luet install -y toolchain/luet-makeiso FROM base RUN zypper in -y \ @@ -72,9 +75,6 @@ RUN zypper in -y \ vim \ which -RUN curl -L https://github.com/rancher/rancherd/releases/download/v0.0.1-alpha05/rancherd-${ARCH} > /usr/bin/rancherd && \ - chmod +x /usr/bin/rancherd - ARG CACHEBUST RUN luet install -y \ toolchain/yip \ @@ -86,7 +86,8 @@ RUN luet install -y \ selinux/k3s \ selinux/rancher \ utils/k9s \ - utils/nerdctl + utils/nerdctl \ + utils/rancherd COPY files/ / RUN mkinitrd diff --git a/Makefile b/Makefile index 0c111095..ed9ec6b4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := iso -REPO=ibuildthecloud/test -LABEL=latest +REPO?=ibuildthecloud/test +LABEL?=latest IMAGE=${REPO}:${LABEL} TOOLS=${IMAGE}-tools @@ -21,10 +21,10 @@ tools: docker build -t ${TOOLS} --target tools . .PHONY: iso -iso: tools build +iso: tools mkdir -p build rm -f build/iso-container - docker run -v /var/run:/var/run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE} + docker run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE} docker cp $$(cat build/iso-container):/output.iso build/output.iso docker rm -fv $$(cat build/iso-container) rm -f build/iso-container diff --git a/files/system/oem/07_cloud-metadata.yaml b/files/system/oem/07_cloud-metadata.yaml index f4738d15..879bb6a7 100644 --- a/files/system/oem/07_cloud-metadata.yaml +++ b/files/system/oem/07_cloud-metadata.yaml @@ -10,5 +10,5 @@ stages: network: - name: "Cloud providers datasources" datasource: - providers: ["aws", "gcp", "cdrom"] + providers: ["aws", "gcp", "cdrom", "openstack"] path: "/oem" diff --git a/files/usr/sbin/suc-upgrade b/files/usr/sbin/suc-upgrade deleted file mode 100755 index c61fe43d..00000000 --- a/files/usr/sbin/suc-upgrade +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -x -e - -if [ "$FORCE" != "true" ]; then - if diff /etc/os-release /host/etc/os-release >/dev/null; then - echo Update to date with - cat /etc/os-release - exit 0 - fi -fi -mount --rbind /host/dev /dev -mount --rbind /host/run /run -bash -x cos-upgrade --directory / -nsenter -i -m -t 1 -- reboot -exit 1 diff --git a/tools/etc/luet/repos.conf.d/mocaccino-repository-index.yml b/tools/etc/luet/repos.conf.d/mocaccino-repository-index.yml deleted file mode 100644 index 74f021d6..00000000 --- a/tools/etc/luet/repos.conf.d/mocaccino-repository-index.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: "mocaccino-repository-index" -description: "MocaccinoOS Repository Index" -type: "http" -enable: true -cached: true -priority: 1 -urls: -- "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" -- "https://get.mocaccino.org/mocaccino-repository-index" diff --git a/tools/iso/iso.yaml b/tools/iso/iso.yaml index cc8e579b..5d27b473 100644 --- a/tools/iso/iso.yaml +++ b/tools/iso/iso.yaml @@ -1,6 +1,4 @@ packages: - rootfs: - - iso/rootfs uefi: - live/systemd-boot - live/boot diff --git a/tools/iso/package/build.yaml b/tools/iso/package/build.yaml deleted file mode 100644 index 46232282..00000000 --- a/tools/iso/package/build.yaml +++ /dev/null @@ -1,2 +0,0 @@ -image: "{{.Values.image}}" -unpack: true diff --git a/tools/iso/package/definition.yaml b/tools/iso/package/definition.yaml deleted file mode 100644 index e93af32e..00000000 --- a/tools/iso/package/definition.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: "rootfs" -category: "iso" -version: "0" diff --git a/tools/iso/values.yaml.tmpl b/tools/iso/values.yaml.tmpl deleted file mode 100644 index a8d8f3ee..00000000 --- a/tools/iso/values.yaml.tmpl +++ /dev/null @@ -1 +0,0 @@ -image: "${IMAGE}" diff --git a/tools/usr/bin/makeiso b/tools/usr/bin/makeiso index 3a1cfd30..52bba1b2 100755 --- a/tools/usr/bin/makeiso +++ b/tools/usr/bin/makeiso @@ -10,11 +10,7 @@ if [ -z "$IMAGE" ]; then fi cd /iso -cat > values.yaml << EOF -image: "$IMAGE" -EOF -luet build --values values.yaml iso/rootfs -luet create-repo -luet-makeiso iso.yaml --local /iso/build +luet-makeiso iso.yaml --image "$IMAGE" + cp distro*iso /output.iso