594 lines
21 KiB
Docker
594 lines
21 KiB
Docker
# https://dev1galaxy.org/viewtopic.php?id=551
|
|
#FROM devuan:jessie-slim
|
|
#FROM devuan:ascii-slim
|
|
FROM dyne/devuan:beowulf
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN echo 'Acquire::http { Proxy "http://192.168.1.49:3142"; };' > /etc/apt/apt.conf.d/02proxy
|
|
RUN apt-get update && apt-get -y upgrade
|
|
|
|
RUN apt-get install -y xorriso squashfs-tools live-boot syslinux-common git zsh debootstrap sudo kpartx xz-utils sudo cgpt parted vim curl sed gawk bsdmainutils rsync slim
|
|
RUN apt-get install -y live-build live-config live-config-sysvinit isolinux grub-efi-amd64-bin grub-common dosfstools gnutls-bin
|
|
#RUN apt-get install -y kpartx cgpt
|
|
#RUN git clone https://git.devuan.org/cyteen/live-sdk
|
|
RUN git clone https://git.devuan.org/sdk/live-sdk.git /live-sdk
|
|
WORKDIR /live-sdk
|
|
#RUN git submodule update --init --recursive --checkout
|
|
RUN pwd
|
|
RUN ls -lh
|
|
RUN git pull && git submodule update --init --recursive --checkout
|
|
|
|
# sub modules might be behind current libdevuansdk git, if you require a more current version of libdevuansdk clone directly:
|
|
#WORKDIR /live-sdk/lib
|
|
#RUN rm -rf libdevuansdk
|
|
#RUN git clone https://git.devuan.org/sdk/libdevuansdk
|
|
|
|
#WORKDIR /live-sdk
|
|
# NB now included in the live-sdk if extra does not have a syslinux directory with isolinux.bin
|
|
#mkdir -p /live-sdk/extra/syslinux
|
|
|
|
# from package live-build
|
|
#cp /usr/share/live/build/bootloaders/isolinux/*.c32 /live-sdk/extra/syslinux
|
|
#cp /usr/share/live/build/bootloaders/isolinux/isolinux.bin /live-sdk/extra/syslinux
|
|
|
|
# from package ISOLINUX
|
|
#cp /usr/lib/ISOLINUX/isohdpfx.bin /live-sdk/extra/syslinux
|
|
|
|
|
|
ENV USER_NAME "default"
|
|
ENV USER_PASS "default"
|
|
|
|
ENV ROOT_CRED "root:toor"
|
|
ENV USER_CRED "${USER_NAME}:${USER_PASS}"
|
|
|
|
ENV DEFAULT_SHELL "/bin/zsh"
|
|
|
|
ENV OS "devuan"
|
|
ENV ARCH "amd64"
|
|
ENV RELEASE "beowulf"
|
|
ENV VERSION 2.0.0
|
|
ENV TEMPLATE_NAME "devuan-beowulf-live_refracta"
|
|
#ENV TEMPLATE_NAME "live-zfs"
|
|
ENV BLEND_NAME "live-zfs"
|
|
ENV BLEND_VERS "3.0-test-$(date +%Y-%m-%d)"
|
|
|
|
#ENV APT_MIRROR "http://192.168.44.47:3142/pkgmaster.devuan.org/merged"
|
|
ENV APT_MIRROR "https://deb.devuan.org/merged"
|
|
#ENV APT_MIRROR "https://pkgmaster.devuan.org/merged"
|
|
|
|
ENV USE_HOOKS "yes"
|
|
ENV SECTION "main contrib non-free"
|
|
ENV RELEASE_CONF "$BLENDPATH/${release}/config"
|
|
ENV IMAGE_NAME "${OS}_${RELEASE}_${VERSION}_${ARCH}_desktop"
|
|
ENV BASE_PACKAGES_OPTION "--no-install-recommends"
|
|
ENV EXTRA_PACKAGES_OPTION "--no-install-recommends"
|
|
|
|
ENV SOURCES_LIST "${BLENDPATH}/sources.list"
|
|
ENV MANUAL_LIST "${BLENDPATH}/manual.list"
|
|
ENV AUTO_LIST "${BLENDPATH}/auto.list"
|
|
|
|
COPY ./live-sdk/blends/${TEMPLATE_NAME} /live-sdk/blends/${BLEND_NAME}
|
|
RUN mv /live-sdk/blends/${BLEND_NAME}/${TEMPLATE_NAME}.blend /live-sdk/blends/${BLEND_NAME}/${BLEND_NAME}.blend
|
|
|
|
|
|
# Enable/disable UEFI - Currently code checks to see if the $mkefi is set not if it is yes or no and turning it off breaks the xorriso build options.
|
|
ENV MKEFI "no"
|
|
ENV GRUB_VER "grub-pc"
|
|
ENV EFI_WORK ""
|
|
#RUN sed -i "s,^\(mkefi=\).*,\1\"${MKEFI}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(efi_work=\).*,\1\"${EFI_WORK}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i '/^mkefi=/s/^/# /' /live-sdk/blends/${BLEND_NAME}/config
|
|
|
|
#ENV MKEFI "yes"
|
|
#ENV GRUB_VER "grub-efi-amd64"
|
|
#ENV EFI_WORK "${BLENDPATH}/efi-files"
|
|
#RUN sed -i '/# mkefi=/s/# /^/' /live-sdk/blends/${BLEND_NAME}/config
|
|
|
|
#WORKDIR /live-sdk/blends/
|
|
#RUN git clone https://git.devuan.org/cyteen/blends/live-zfs
|
|
#RUN git checkout -b ${BLEND_NAME}
|
|
|
|
## Once working and building push to git
|
|
#RUN git push origin ${BLEND_NAME}
|
|
|
|
|
|
WORKDIR /live-sdk
|
|
# Add the new blend to the sdk blend_map so we can build it.
|
|
RUN pwd
|
|
RUN ls
|
|
RUN sed -i "/blend_map=.*/ s/.*/&\n\t\t\"${BLEND_NAME}\" \"\$R\/blends\/${BLEND_NAME}\/${BLEND_NAME}.blend\"/" sdk
|
|
|
|
# Add call for sourceslist
|
|
#RUN sed -i "/install-custdebs.*/ s/.*/&\n\tinstall-packageslist || zerr/" sdk
|
|
|
|
COPY bin/edit-config.sh /live-sdk/edit-config.sh
|
|
|
|
# #!/bin/bash
|
|
# /live-sdk/edit-config.sh
|
|
#
|
|
# CONFIG_FILE="${2}"
|
|
# declare -A arr
|
|
# arr+=( "${1}" )
|
|
# for TARGET_KEY in "${!arr[@]}"; do
|
|
# echo "x " ${TARGET_KEY} ${arr[${TARGET_KEY}]} ${CONFIG_FILE}
|
|
# if grep -q "^${TARGET_KEY}=" ${CONFIG_FILE}; then
|
|
# sed -i "s|^${TARGET_KEY}.*|${TARGET_KEY}=\"${arr[${TARGET_KEY}]}\"|" ${CONFIG_FILE}
|
|
# else
|
|
# sed -i "/^blend_name=.*/ s|.*|&\n${TARGET_KEY}=\"${arr[${TARGET_KEY}]}\"|" ${CONFIG_FILE}
|
|
# fi
|
|
# done
|
|
|
|
# FIXME: Some settings in the blend config fail to override libdevuansdk/conf we should test setting in blend first to identify which ones are not imported.
|
|
|
|
# Construct array for edit-config
|
|
# Taken from /live-sdk/lib/libdevuansdk/config
|
|
ENV CORE_PACKAGES \
|
|
devuan-keyring \
|
|
debian-keyring \
|
|
ca-certificates \
|
|
initramfs-tools \
|
|
e2fsprogs \
|
|
curl \
|
|
less \
|
|
vim \
|
|
nano \
|
|
sysvinit \
|
|
""
|
|
|
|
ENV EXTRA_PACKAGES \
|
|
librsvg2-common \
|
|
fonts-quicksand \
|
|
fonts-symbola \
|
|
xserver-xorg-input-all \
|
|
xserver-xorg-video-all \
|
|
anacron \
|
|
bluetooth \
|
|
iw \
|
|
powertop \
|
|
vim-gtk \
|
|
wireless-tools \
|
|
wpasupplicant \
|
|
tasksel \
|
|
xfce4 \
|
|
xfce4-goodies \
|
|
xfce4-power-manager \
|
|
xfce4-terminal \
|
|
atril \
|
|
dbus-x11 \
|
|
hunspell-en-gb \
|
|
hyphen-en-gb \
|
|
mythes-en-us \
|
|
synaptic \
|
|
system-config-printer \
|
|
tango-icon-theme \
|
|
xsane \
|
|
enlightenment \
|
|
terminology \
|
|
rox-filer \
|
|
slim \
|
|
libeina-bin \
|
|
neovim \
|
|
firmware-atheros \
|
|
firmware-bnx2 \
|
|
firmware-bnx2x \
|
|
firmware-brcm80211 \
|
|
firmware-intelwimax \
|
|
firmware-iwlwifi \
|
|
firmware-libertas \
|
|
firmware-linux-nonfree \
|
|
firmware-misc-nonfree \
|
|
firmware-myricom \
|
|
firmware-netxen \
|
|
firmware-qlogic \
|
|
firmware-ralink \
|
|
firmware-realtek \
|
|
firmware-ti-connectivity \
|
|
firmware-zd1211 \
|
|
sudo \
|
|
yad \
|
|
refractainstaller-gui \
|
|
refractasnapshot-gui \
|
|
linux-headers-amd64 \
|
|
dkms \
|
|
spl-dkms \
|
|
zfs-dkms \
|
|
#libreoffice \
|
|
#libreoffice-gtk3 \
|
|
#libreoffice-help-en-gb \
|
|
#mousepad \
|
|
#network-manager-gnome \
|
|
#avahi-daemon \
|
|
#lightdm \
|
|
#quodlibet \
|
|
#light-locker \
|
|
#orca \
|
|
""
|
|
|
|
RUN mkdir -p /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc && \
|
|
echo spl >> /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/modules && \
|
|
echo zfs >> /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/modules
|
|
|
|
## /etc/slim.conf
|
|
# login_cmd exec /bin/bash -login /etc/X11/Xsession %session
|
|
# sessiondir /usr/share/xsessions/ # contains enlightenment.desktop:Exec=/usr/bin/enlightenment and xfce.desktop:Exec=startxfce4
|
|
# default_user devuan
|
|
# auto_login yes
|
|
|
|
#RUN cp /etc/slim.conf /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf
|
|
#RUN \
|
|
# echo "# HELLO THERE!" >> /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf && \
|
|
# sed -i "s|^login_cmd.*|login_cmd exec /bin/sh - ~/.xinitrc \%session|" /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf && \
|
|
# sed -i "/^#.*auto_login/ s/^#//" /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf && \
|
|
# sed -i "s/^default_user.*/default_user\ ${USER_NAME}/" /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf && \
|
|
# sed -i "/^# default_user/ s/^#//" /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf
|
|
#
|
|
#RUN cat /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/etc/slim.conf >> /var/tmp/slim.conf
|
|
|
|
RUN mkdir -p /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/home/${USER_NAME}
|
|
|
|
#RUN echo $'DEFAULT_SESSION=enlightenment_start\n\
|
|
#\n\
|
|
#case $session in\n\
|
|
# enlightenment ) exec enlightenment_start ;;\n\
|
|
# xfce|xfce4 ) exec startxfce4 ;;\n\
|
|
# # No known session, try to run it as command\n\
|
|
# *) exec $DEFAULT_SESSION ;;\n\
|
|
#esac '\
|
|
#>> /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/home/${USER_NAME}/.xinitrc
|
|
#
|
|
#RUN cat /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/home/${USER_NAME}/.xinitrc >> /var/tmp/xinitrc
|
|
|
|
|
|
ENV BASE_PACKAGES \
|
|
apt-utils \
|
|
dselect \
|
|
parted \
|
|
openssh-server \
|
|
openssh-client \
|
|
sudo \
|
|
alsa-base \
|
|
alsa-utils \
|
|
mawk \
|
|
tmux \
|
|
screen \
|
|
#openntpd \
|
|
ntp \
|
|
wpasupplicant \
|
|
wireless-tools \
|
|
elinks \
|
|
firmware-linux-free \
|
|
btrfs-tools \
|
|
zsh \
|
|
rsync \
|
|
git-core \
|
|
mlocate \
|
|
""
|
|
|
|
ENV PURGE_PACKAGES \
|
|
apparmor \
|
|
apparmor-utils \
|
|
auditd \
|
|
apparmor-profiles \
|
|
apparmor-profiles-extra \
|
|
avahi-daemon \
|
|
avahi-autoipd \
|
|
libavahi-common-data \
|
|
libavahi-common3 \
|
|
libavahi-glib1 \
|
|
libavahi-client3 \
|
|
cups-browsed \
|
|
gvfs-daemon \
|
|
libpam-gnome-keyring \
|
|
policykit-1 \
|
|
pulseaudio \
|
|
pulseaudio-utils \
|
|
xscreensaver \
|
|
xscreensaver-data \
|
|
""
|
|
|
|
ENV CUSTOM_DEB_PACKAGES \
|
|
dissenter-browser_0.70.122_amd64.deb \
|
|
""
|
|
|
|
ENV FINALIZE_PURGE_PACKAGES \
|
|
""
|
|
|
|
### ## ENV CORE_VALUES " \
|
|
### ## ["core_packages="]=${CORE_PACKAGES[@]} \
|
|
### ## "
|
|
### ##
|
|
### ## ENV BASE_VALUES " \
|
|
### ## ["base_packages="]=${BASE_PACKAGES[@]} \
|
|
### ## "
|
|
### ##
|
|
### ## ENV PURGE_VALUES " \
|
|
### ## ["purge_packages="]=${PURGE_PACKAGES[@]} \
|
|
### ## "
|
|
### ##
|
|
### ## ENV FINALIZE_PURGE_VALUES " \
|
|
### ## ["finalize_purge_packages="]=${FINALIZE_PURGE_PACKAGES[@]} \
|
|
### ## "
|
|
|
|
ENV SDK_CONFIG /live-sdk/lib/libdevuansdk/config
|
|
ENV BLEND_CONFIG /live-sdk/blends/${BLEND_NAME}/config
|
|
ENV BLEND_PACKAGE_CONFIG /live-sdk/blends/${BLEND_NAME}/${RELEASE}/config
|
|
|
|
#### # Bash-isms follow, so:
|
|
#### SHELL ["/bin/bash", "-c"]
|
|
####
|
|
#### # Use sed to insert ..._package sections if missing. The Q42 is a forced exit status.
|
|
#### # Assumes the base_package stanza is present.
|
|
#### RUN ( \
|
|
#### if $(sed -n -e "/^core_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\core_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### # if $(sed -n -e "/^extra_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\EXTRA_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### if $(sed -n -e "/^purge_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\purge_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### # if $(sed -n -e "/^custom_deb_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\custom_deb_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### # if $(sed -n -e "/^finalize_purge_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\finalize_purge_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### # if $(sed -n -e "/^blend_package/ Q42" ${BLEND_CONFIG} ); then sed -i "/^base_packages/ i\blend_packages+=(\n)\n" ${BLEND_CONFIG}; fi; \
|
|
#### # \
|
|
#### # Use sed to replace block of values. \
|
|
#### # This works and is copy/pasteable to a bash shell, but the '[@]' elements are not strictly needed in a Dockerfile. \
|
|
#### # RUN ( \
|
|
#### sed -i \
|
|
#### -e "/^core_packages/,/^)$/ c\core_packages=(\n${CORE_PACKAGES[@]}\n)" \
|
|
#### # -e "/^base_packages/,/^)$/ c\base_packages=(\n${BASE_PACKAGES[@]}\n)" \
|
|
#### # -e "/^extra_packages/,/^)$/ i\extra_packages+=(\n${EXTRA_PACKAGES[@]}\n);Q" \
|
|
#### -e "/^purge_packages/,/^)$/ c\purge_packages+=(\n${PURGE_PACKAGES[@]}\n)" \
|
|
#### # -e "/^custom_deb_packages/,/^)$/ c\custom_deb_packages+=(\n${CUSTOM_DEB_PACKAGES[@]}\n)" \
|
|
#### # -e "/^finalize_purge_packages/,/^)$/ c\finalize_purge_packages+=(\n${FINALIZE_PURGE_PACKAGES[@]}\n)" \
|
|
#### ${BLEND_CONFIG}; \
|
|
#### ## \
|
|
#### ## Use sed to format the lists one per line, tabbed. \
|
|
#### ## Works for not- and tab-indented lists. \
|
|
#### ##RUN ( \
|
|
#### sed -i \
|
|
#### ## -e "/^core_packages/, /^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### ## -e "/^base_packages/, /^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### ### -e "/^extra_packages/,/^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### ## -e "/^purge_packages/,/^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### -e "/^custom_deb_packages/,/^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### ## -e "/^finalize_purge_packages/,/^)$/ { n; s/^/\t/; s/ \t/\n\t/g; s/ \([^\t]\)/\n\t\1/g; }" \
|
|
#### ${BLEND_CONFIG}; \
|
|
#### cat ${BLEND_CONFIG}; \
|
|
#### )
|
|
|
|
### ## RUN edit-config-list.sh ${CORE_VALUES} ${BLEND_CONFIG}
|
|
### ## RUN edit-config-list.sh ${BASE_VALUES} ${BLEND_CONFIG}
|
|
### ## RUN edit-config-list.sh ${PURGE_VALUES} ${BLEND_CONFIG}
|
|
### ##
|
|
### ## # FIXME: Does edit-config.sh cope with multi-line variables in CONFIG_VALUES below.
|
|
|
|
|
|
### #ENV CONFIG_VALUES " \
|
|
### # ["core_packages"]=${CORE_PACKAGES} \
|
|
### # ["base_packages"]=${BASE_PACKAGES} \
|
|
### # ["purge_packages"]=${PURGE_PACKAGES} \
|
|
### # "
|
|
|
|
# These values are over-ridden by the blend conf files so should probably only be changed when releasing sdk updates.
|
|
ENV SDK_CONFIG_VALUES "\
|
|
["os"]='${OS}' \
|
|
["release"]='${RELEASE}' \
|
|
["version"]='${VERSION}' \
|
|
["mirror"]='${APT_MIRROR}' \
|
|
["section"]='${SECTION}' \
|
|
["image_name"]='${IMAGE_NAME}' \
|
|
["rootcredentials"]='${ROOT_CRED}' \
|
|
["usercredentials"]='${USER_CRED}' \
|
|
["corepackages_option"]='' \
|
|
["core_packages"]='${CORE_PACKAGES}' \
|
|
["base_packages_option"]='' \
|
|
["base_packages"]='${BASE_PACKAGES}' \
|
|
["purge_packages_option"]='' \
|
|
["purge_packages"]='${PURGE_PACKAGES}' \
|
|
"
|
|
#RUN /live-sdk/edit-config.sh "${CONFIG_VALUES}" ${SDK_CONFIG}
|
|
|
|
ENV CONFIG_VALUES " \
|
|
["core_packages"]='${CORE_PACKAGES}' \
|
|
["base_packages"]='${BASE_PACKAGES}' \
|
|
["purge_packages"]='${PURGE_PACKAGES}' \
|
|
["extra_packages"]='${EXTRA_PACKAGES}' \
|
|
["custom_deb_packages"]='${CUSTOM_DEB_PACKAGES}' \
|
|
["finalize_purge_packages"]='${FINALIZE_PURGE_PACKAGES}' \
|
|
"
|
|
RUN /live-sdk/edit-config.sh "${CONFIG_VALUES}" ${BLEND_PACKAGE_CONFIG}
|
|
|
|
|
|
#ENV CONFIG_VALUES " \
|
|
# ["os"]='${OS}' \
|
|
# ["release"]='${RELEASE}' \
|
|
# ["version"]='${VERSION}' \
|
|
# ["mirror"]='${APT_MIRROR}' \
|
|
# ["section"]='${SECTION}' \
|
|
# ["image_name"]='${IMAGE_NAME}' \
|
|
# "
|
|
#RUN /live-sdk/edit-config.sh "${CONFIG_VALUES}" ${BLEND_CONFIG}
|
|
|
|
ENV BLEND_CONFIG_VALUES " \
|
|
["blend_name"]='${BLEND_NAME}' \
|
|
["release"]='${RELEASE}' \
|
|
["version"]='${BLEND_VERS}' \
|
|
["user_name"]='${USER_NAME}' \
|
|
["user_pass"]='${USER_PASS}' \
|
|
["default-shell"]='${DEFAULT_SHELL}' \
|
|
["manual_list"]='${MANUAL_LIST}' \
|
|
["auto_list"]='${AUTO_LIST}' \
|
|
["grubversion"]='${GRUB_VER}' \
|
|
["mirror"]='${APT_MIRROR}' \
|
|
["section"]='${SECTION}' \
|
|
["release_conf"]='${RELEASE_CONF}' \
|
|
["image_name"]='${IMAGE_NAME}' \
|
|
# ["mkefi"]='${MKEFI}' \
|
|
# ["efi_work"]='${EFI_WORK}' \
|
|
# ["base_packages_option"]='${BASE_PACKAGES_OPTION}'
|
|
# ["extra_packages_option"]='${EXTRA_PACKAGES_OPTION}'
|
|
# ["hookscripts"]='${USE_HOOKS}' \
|
|
# ["arch"]='${ARCH}' \
|
|
# ["sources_list"]='${SOURCES_LIST}' \
|
|
"
|
|
RUN /live-sdk/edit-config.sh "${BLEND_CONFIG_VALUES}" ${BLEND_CONFIG}
|
|
|
|
# Add zfs var and arrs filesystems you would like to snapshot separately or
|
|
# apply and indiviual quota
|
|
#vars+=(zfs_poolname)
|
|
ENV ZFS_POOLNAME "rpool"
|
|
|
|
#arrs+=(zfs_datasets)
|
|
ENV ZFS_DATASETS " \
|
|
"/home" \
|
|
"/home/${username}" \
|
|
"/space" \
|
|
"/opt" \
|
|
"/tmp" \
|
|
"/usr" \
|
|
"/usr/share" \
|
|
"/usr/local" \
|
|
"/var" \
|
|
"/var/cache" \
|
|
"/var/cache/apt" \
|
|
"/var/lib" \
|
|
"/var/tmp" \
|
|
"/var/lib/virt" \
|
|
"/var/lib/lxc" \
|
|
"/var/lib/docker" \
|
|
"/var/log" \
|
|
"/var/spool" \
|
|
"/var/tmp" \
|
|
"
|
|
|
|
# Given on the load commandline
|
|
#RUN sed -i "s,^\(os=\).*,\1\"${OS}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
|
|
#RUN sed -i "s,^\(blend_name=\).*,\1\"${BLEND_NAME}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#
|
|
#RUN sed -i "s,^\(username=\).*,\1\"${USER_NAME}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(userpass=\).*,\1\"${USER_PASS}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(default_shell=\).*,\1\"${DEFAULT_SHELL}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#
|
|
#RUN sed -i "s,^\(hookscripts=\).*,\1\"${USE_HOOKS}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(hookscripts=\).*,\1\"${USE_HOOKS}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(section=\).*,\1\"${SECTION}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN sed -i "s,^\(image_name=\).*,\1\"${IMAGE_NAME}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#
|
|
#RUN sed -i "s,^\(grubversion=\).*,\1\"${GRUB_VER}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#
|
|
##RUN sed -i "s,^\(blend_vers=\).*,\1\"${BLEND_VERS}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN grep -q '^blend_vers=' /live-sdk/blends/${BLEND_VERS}/config && \
|
|
# sed -i "s/^blend_vers.*/mirror=${BLEND_VERS}/" /live-sdk/blends/${BLEND_NAME}/config || \
|
|
# sed -i "/blend_name=.*/ s/.*/&\n^release=${BLEND_VERS}\"/" /live-sdk/blends/${BLEND_NAME/config}
|
|
#
|
|
##RUN sed -i "s,^\(release=\).*,\1\"${RELEASE}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN grep -q '^release=' /live-sdk/blends/${BLEND_NAME}/config && \
|
|
# sed -i "s/^release.*/mirror=${RELEASE}/" /live-sdk/blends/${BLEND_NAME}/config || \
|
|
# sed -i "/blend_name=.*/ s/.*/&\n^release=${RELEASE}\"/" /live-sdk/blends/${BLEND_NAME/config}
|
|
#
|
|
#RUN grep -q '^mirror=' /live-sdk/blends/${BLEND_NAME}/config && \
|
|
# sed -i "s/^mirror.*/mirror=${APT_MIRROR}/" /live-sdk/blends/${BLEND_NAME}/config || \
|
|
# sed -i "/blend_name=.*/ s/.*/&\n^mirror=${BLEND_NAME}\"/" /live-sdk/blends/${BLEND_NAME/config}
|
|
#
|
|
#RUN sed -i "s,^\(mirror=\).*,\1\"${APT_MIRROR}\"," /live-sdk/blends/${BLEND_NAME}/config
|
|
|
|
|
|
# Add/remove packages not already in the blend
|
|
#RUN echo ""extra_packages+=( smartmontools gsmartcontrol ) >> /live-sdk/blends/${BLEND_NAME}/config
|
|
#RUN purge_packages+=( policykit-1) >> /live-sdk/blends/${BLEND_NAME}/config
|
|
|
|
# Add hook scripts not all ready in the blend
|
|
#RUN echo "" > /live-sdk/blends/${BLEND_NAME}/hooks/hook.sh
|
|
#COPY common/hooks/hook.sh /live-sdk/blends/${BLEND_NAME}/hooks/hook.sh
|
|
|
|
# Add custom debs not already in the blend
|
|
#RUN echo "custom_deb_packages+=( sanoid_1.4.14-1_amd64.deb )" >> /live-sdk/blends/${BLEND_NAME}/config
|
|
#COPY common/custom-packages/sanoid_1.4.14-1_amd64.deb /live-sdk/blends/${BLEND_NAME}/sanoid_1.4.14-1_amd64.deb
|
|
|
|
## copy a get-selections from the livecd (install your prefered programs beforehand)
|
|
#dpkg --get-selections > /var/tmp/packages.list
|
|
#/usr/bin/apt-mark showauto > /var/tmp/pkgs_auto.lst
|
|
#/usr/bin/apt-mark showmanual > /var/tmp/pkgs_manual.lst
|
|
COPY packages.list blends/${BLEND_NAME}/packages.list
|
|
#COPY pkgs_auto.list blends/${BLEND_NAME}/pkgs_auto.list
|
|
#COPY pkgs_manual.list blends/${BLEND_NAME}/pkgs_manual.list
|
|
|
|
COPY pkgs_auto.list-ascii blends/${BLEND_NAME}/pkgs_auto.list
|
|
COPY pkgs_manual.list-ascii blends/${BLEND_NAME}/pkgs_manual.list
|
|
|
|
ENV AUTOMATE_HOME /live-sdk/blends/${BLEND_NAME}/${RELEASE}/rootfs-overlay/var/tmp/
|
|
COPY automate ${AUTOMATE_HOME}
|
|
COPY automate /live-sdk/automate
|
|
|
|
SHELL ["/bin/zsh", "-c"]
|
|
|
|
## Build sequence:
|
|
# source sdk
|
|
# load ${OS} ${ARCH} ${BLEND_NAME}
|
|
# build_iso_dist() {
|
|
# bootstrap_complete_base
|
|
# (*) bootstrapping devuan amd64 base
|
|
# (*) running debootstrap stage 1 - retrieve and validate
|
|
# (*) running debootstrap stage 2 - unpack and configure
|
|
# (*) writing system configuration
|
|
# (*) running debootstrap stage 3 - mount and chroot
|
|
# (*) chrooting to execute thirdstage...
|
|
# (*) Creating boostrap tarball in /live-sdk/tmp/bootstrap-devuan-amd64-stage3.tgz
|
|
# (*) chrooting to execute postunpack... - install blend debs
|
|
# devprocsys mount $strapdir
|
|
# chroot-script /var/tmp/automate/001_locales.sh
|
|
# chroot-script /var/tmp/automate/010_alsa.sh
|
|
# chroot-script /var/tmp/automate/020_waterfox.sh
|
|
# chroot-script /var/tmp/automate/020_vim.sh
|
|
# chroot-script /var/tmp/automate/020_nanorc.sh
|
|
# chroot-script /var/tmp/automate/020_neovim.sh
|
|
# chroot-script /var/tmp/automate/020_neofetch_motd.sh
|
|
# chroot-script /var/tmp/automate/020_tmux.sh
|
|
# chroot-script /var/tmp/automate/020_rox-filer.sh
|
|
# chroot-script /var/tmp/automate/020_wicd.sh
|
|
# chroot-script /var/tmp/automate/050_xscreensaver.sh
|
|
# devprocsys umount $strapdir
|
|
# blend_preinst
|
|
# (*) executing devuan-desktop-live_ preinst
|
|
# (*) adding user devuan:devuan
|
|
# (*) chrooting to execute adduser...
|
|
# iso_prepare_strap
|
|
# (*) preparing strapdir for livecd
|
|
# (*) chrooting to execute isoprep...
|
|
# build_kernel_${arch}
|
|
# (*) installing stock kernel for amd64
|
|
# (*) chrooting to execute install-linux...
|
|
# iso_setup_isolinux
|
|
# (*) setting up isolinux
|
|
# iso_write_isolinux_cfg
|
|
# (*) writing isolinux configuration
|
|
# (*) copying isolinux overlay
|
|
# blend_postinst
|
|
# (*) executing devuan-desktop-live_ postinst
|
|
# (*) chrooting to execute install-debs...
|
|
# (*) chrooting to execute finalize...
|
|
# fill_apt_cache
|
|
# iso_squash_strap
|
|
# (*) creating squashfs out of strapdir
|
|
# iso_xorriso_build
|
|
# (*) building iso...
|
|
#}
|
|
|
|
## RUN echo "#!/usr/bin/env zsh" > build-iso.zsh && \
|
|
## echo "source sdk" >> build-iso.zsh && \
|
|
## echo "load ${OS} ${ARCH} ${BLEND_NAME}" >> build-iso.zsh && \
|
|
## echo "build_iso_dist" >> build-iso.zsh && \
|
|
## chmod +x build-iso.zsh
|
|
#RUN ( \
|
|
# ( echo "#!/usr/bin/env zsh"; \
|
|
# echo "source sdk"; \
|
|
# echo "load ${OS} ${ARCH} ${BLEND_NAME}"; \
|
|
# echo "build_iso_dist" \
|
|
# ) >> build-iso.zsh \
|
|
# && chmod +x build-iso.zsh && ls -l build-iso.zsh && cat build-iso.zsh \
|
|
# )
|
|
|
|
COPY bin/build-iso.zsh build-iso.zsh
|
|
#RUN ( ls -l build-iso.zsh; ./build-iso.zsh )
|
|
|
|
RUN cat ${SDK_CONFIG}; cat ${BLEND_CONFIG}
|
|
### #ENTRYPOINT ["/bin/zsh", "-f", "-c", "source sdk"]
|
|
CMD ["./build-iso.zsh"]
|