mirror of
https://github.com/rancher/os.git
synced 2025-07-19 09:26:27 +00:00
Merge pull request #3 from mudler/master
Cleanup after integrating changes into cOS
This commit is contained in:
commit
e38bab4144
23
Dockerfile
23
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
|
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
|
ARG ARCH=amd64
|
||||||
ENV ARCH=${ARCH}
|
ENV ARCH=${ARCH}
|
||||||
ENV LUET_VERSION 0.16.7
|
|
||||||
RUN zypper rm -y container-suseconnect
|
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 ar --priority=200 http://download.opensuse.org/distribution/leap/15.3/repo/oss repo-oss
|
||||||
RUN zypper --no-gpg-checks ref
|
RUN zypper --no-gpg-checks ref
|
||||||
COPY files/etc/luet/luet.yaml /etc/luet/luet.yaml
|
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
|
FROM base as tools
|
||||||
RUN zypper in -y docker squashfs xorriso
|
ENV LUET_NOLOCK=true
|
||||||
|
RUN zypper in -y squashfs xorriso
|
||||||
COPY tools /
|
COPY tools /
|
||||||
RUN luet install -y repository/luet repository/mocaccino-repository-index
|
RUN luet install -y toolchain/luet-makeiso
|
||||||
RUN luet install -y extension/makeiso
|
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
RUN zypper in -y \
|
RUN zypper in -y \
|
||||||
@ -72,9 +75,6 @@ RUN zypper in -y \
|
|||||||
vim \
|
vim \
|
||||||
which
|
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
|
ARG CACHEBUST
|
||||||
RUN luet install -y \
|
RUN luet install -y \
|
||||||
toolchain/yip \
|
toolchain/yip \
|
||||||
@ -86,7 +86,8 @@ RUN luet install -y \
|
|||||||
selinux/k3s \
|
selinux/k3s \
|
||||||
selinux/rancher \
|
selinux/rancher \
|
||||||
utils/k9s \
|
utils/k9s \
|
||||||
utils/nerdctl
|
utils/nerdctl \
|
||||||
|
utils/rancherd
|
||||||
|
|
||||||
COPY files/ /
|
COPY files/ /
|
||||||
RUN mkinitrd
|
RUN mkinitrd
|
||||||
|
8
Makefile
8
Makefile
@ -1,6 +1,6 @@
|
|||||||
.DEFAULT_GOAL := iso
|
.DEFAULT_GOAL := iso
|
||||||
REPO=ibuildthecloud/test
|
REPO?=ibuildthecloud/test
|
||||||
LABEL=latest
|
LABEL?=latest
|
||||||
IMAGE=${REPO}:${LABEL}
|
IMAGE=${REPO}:${LABEL}
|
||||||
TOOLS=${IMAGE}-tools
|
TOOLS=${IMAGE}-tools
|
||||||
|
|
||||||
@ -21,10 +21,10 @@ tools:
|
|||||||
docker build -t ${TOOLS} --target tools .
|
docker build -t ${TOOLS} --target tools .
|
||||||
|
|
||||||
.PHONY: iso
|
.PHONY: iso
|
||||||
iso: tools build
|
iso: tools
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
rm -f build/iso-container
|
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 cp $$(cat build/iso-container):/output.iso build/output.iso
|
||||||
docker rm -fv $$(cat build/iso-container)
|
docker rm -fv $$(cat build/iso-container)
|
||||||
rm -f build/iso-container
|
rm -f build/iso-container
|
||||||
|
@ -10,5 +10,5 @@ stages:
|
|||||||
network:
|
network:
|
||||||
- name: "Cloud providers datasources"
|
- name: "Cloud providers datasources"
|
||||||
datasource:
|
datasource:
|
||||||
providers: ["aws", "gcp", "cdrom"]
|
providers: ["aws", "gcp", "cdrom", "openstack"]
|
||||||
path: "/oem"
|
path: "/oem"
|
||||||
|
@ -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
|
|
@ -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"
|
|
@ -1,6 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
rootfs:
|
|
||||||
- iso/rootfs
|
|
||||||
uefi:
|
uefi:
|
||||||
- live/systemd-boot
|
- live/systemd-boot
|
||||||
- live/boot
|
- live/boot
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
image: "{{.Values.image}}"
|
|
||||||
unpack: true
|
|
@ -1,3 +0,0 @@
|
|||||||
name: "rootfs"
|
|
||||||
category: "iso"
|
|
||||||
version: "0"
|
|
@ -1 +0,0 @@
|
|||||||
image: "${IMAGE}"
|
|
@ -10,11 +10,7 @@ if [ -z "$IMAGE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd /iso
|
cd /iso
|
||||||
cat > values.yaml << EOF
|
|
||||||
image: "$IMAGE"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
luet build --values values.yaml iso/rootfs
|
luet-makeiso iso.yaml --image "$IMAGE"
|
||||||
luet create-repo
|
|
||||||
luet-makeiso iso.yaml --local /iso/build
|
|
||||||
cp distro*iso /output.iso
|
cp distro*iso /output.iso
|
||||||
|
Loading…
Reference in New Issue
Block a user