Release 23.08.1, Milestone with Debian 12

This commit is contained in:
accetto
2023-08-18 17:47:58 +02:00
parent a3dcc36bf9
commit b37eeeb65f
23 changed files with 604 additions and 41 deletions

View File

@@ -6,6 +6,26 @@
***
### Release 23.08.1 (Milestone)
This release brings new images based on the current **Debian 12**.
The images based on the previous **Debian 11** will still be published into the same repositories.
Other changes:
- hook scripts `env.rc`, `push` and `post_push` have been updated
- handling of multiple deployment tags per image has been improved and it covers also publishing into the builder repository now
- file `readme-local-building-example.md` got a new section `Tips and examples`, containing
- `How to deploy all images into one repository`
Main updated components:
- `Debian` to version **12.1**
- `Xfce` desktop to version **4.18**
- `Mousepad` to version **0.5.10**
- `nano` to version **7.2**
- `Python` to version **3.11.2**
### Release 23.08
This release brings updated and significantly shortened README files, because most of the content has been moved into the new [User guide][this-user-guide].

View File

@@ -35,7 +35,7 @@ Version: G3v1
This GitHub repository contains resources and tools for building Docker images for headless working.
The images are based on [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The images are based on the current [Debian 12][docker-debian] and the previous [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The popular web browsers [Chromium][chromium] and [Firefox][firefox] are also included.
This [User guide][this-user-guide] describes the images and how to use them.

View File

@@ -1,6 +1,6 @@
#!/bin/bash -e
### @accetto, August 2021
### updated: September 2022, January 2023
### updated: August 2023
### depends on the hook scripts
### set the environment variables first, e.g. 'source .secrets'
@@ -44,7 +44,7 @@ This script can:
Usage: $0 <blend> <command> [<docker-cli-options>]
blend := (latest[-chromium|-firefox])
blend := (latest|bookworm|bullseye)[-chromium|-firefox])
command := (all|all-no-push)|(pre_build|build|push|post_push|cache)
The <docker-cli-options> (e.g. '--no-cache') are passed to the Docker CLI commands used internally.

View File

@@ -1,7 +1,7 @@
#!/bin/bash
### do not use '-e'
### @accetto, September 2022
### updated: July 2023
### updated: August 2023
### depends on the script 'builder.sh'
### set the environment variables first, e.g. 'source .secrets'
@@ -101,9 +101,9 @@ Usage: <script> <mode> <argument> [<optional-argument>]...
<command> := (all|all-no-push)
<mode> := (group|family)
<blend> := pivotal
|(complete[-latest|-chromium|-firefox])
|(latest[-chromium|-firefox])
<parent-blend> := (complete)|(latest[-chromium|-firefox])
|(complete[-latest|-bookworm|-bullseye|-chromium|-firefox])
|(latest|bookworm|bullseye[-chromium|-firefox])
<parent-blend> := (complete)|(latest|bookworm|bullseye[-chromium|-firefox])
<child-suffix> := depends on context, e.g. '-ver1|-ver2' (currently none supported)
Group mode : All images are processed independently.
@@ -292,25 +292,45 @@ main() {
build_group "${command}" "latest" "latest-firefox" "latest-chromium"
;;
complete | complete-latest )
complete )
clear_log
build_group "${command}" "latest" "bullseye" "latest-firefox" "bullseye-firefox" "latest-chromium" "bullseye-chromium"
;;
complete-latest )
clear_log
build_group "${command}" "latest" "latest-firefox" "latest-chromium"
;;
complete-bookworm )
clear_log
build_group "${command}" "bookworm" "bookworm-firefox" "bookworm-chromium"
;;
complete-bullseye )
clear_log
build_group "${command}" "bullseye" "bullseye-firefox" "bullseye-chromium"
;;
complete-chromium )
clear_log
build_group "${command}" "latest-chromium"
build_group "${command}" "latest-chromium" "bullseye-chromium"
;;
complete-firefox )
clear_log
build_group "${command}" "latest-firefox"
build_group "${command}" "latest-firefox" "bullseye-firefox"
;;
latest | latest-chromium | latest-firefox )
latest | latest-chromium | latest-firefox \
| bookworm | bookworm-chromium | bookworm-firefox \
| bullseye | bullseye-chromium | bullseye-firefox )
clear_log
build_group "${command}" "${subject}" $@
@@ -335,7 +355,9 @@ main() {
build_family "${command}" "latest-chromium"
;;
latest | latest-chromium | latest-firefox )
latest | latest-chromium | latest-firefox \
| bookworm | bookworm-chromium | bookworm-firefox \
| bullseye | bullseye-chromium | bullseye-firefox )
clear_log
build_family "${command}" "${subject}" $@

381
docker/Dockerfile.xfce.12 Normal file
View File

@@ -0,0 +1,381 @@
# syntax=docker/dockerfile:experimental
ARG BASEIMAGE=debian
ARG BASETAG=12-slim
ARG ARG_MERGE_STAGE_VNC_BASE=stage_vnc
ARG ARG_MERGE_STAGE_BROWSER_BASE=merge_stage_vnc
ARG ARG_FINAL_STAGE_BASE=merge_stage_browser
ARG ARG_HEADLESS_USER_ID=1000
ARG ARG_HEADLESS_USER_NAME=headless
ARG ARG_HEADLESS_USER_GROUP_ID=1000
ARG ARG_HEADLESS_USER_GROUP_NAME=headless
ARG ARG_SUDO_INITIAL_PW=headless
###############
### stage_cache
###############
FROM ${BASEIMAGE}:${BASETAG} as stage_cache
### refresh the 'apt' cache
RUN rm -f /etc/apt/apt.conf.d/docker-clean ; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true" ;' > /etc/apt/apt.conf.d/keep-cache
RUN apt-get update
### embed the local '.g3-cache' from the build context
### note that the bound cache '/tmp/cache2' is ephemeral and all written data will be discarded automatically
### therefore copy its content into the another permanent cache '/tmp/g3-cache'
RUN \
--mount=type=bind,target=/tmp/cache2 \
mkdir -p /tmp/g3-cache \
&& if [ -d /tmp/cache2/.g3-cache/ ] ; then cp -r /tmp/cache2/.g3-cache/* /tmp/g3-cache/ ; fi
####################
### stage_essentials
####################
FROM ${BASEIMAGE}:${BASETAG} as stage_essentials
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
gettext-base \
gir1.2-rsvg-2.0 \
jq \
nano \
procps \
psmisc \
sudo \
tini \
wget
#################
### stage_xserver
#################
FROM stage_essentials as stage_xserver
ARG ARG_APT_NO_RECOMMENDS
ENV \
FEATURES_BUILD_SLIM_XSERVER="${ARG_APT_NO_RECOMMENDS:+1}" \
NO_AT_BRIDGE=1
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
dbus-x11 \
xauth \
xinit \
x11-xserver-utils \
xdg-utils
##############
### stage_xfce
##############
FROM stage_xserver as stage_xfce
ARG ARG_APT_NO_RECOMMENDS
ENV FEATURES_BUILD_SLIM_XFCE="${ARG_APT_NO_RECOMMENDS:+1}"
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
xfce4 \
xfce4-terminal
###############
### stage_tools
###############
FROM stage_xfce as stage_tools
ARG ARG_APT_NO_RECOMMENDS
ARG ARG_FEATURES_SCREENSHOOTING
ARG ARG_FEATURES_THUMBNAILING
ENV \
FEATURES_BUILD_SLIM_TOOLS="${ARG_APT_NO_RECOMMENDS:+1}" \
FEATURES_SCREENSHOOTING="${ARG_FEATURES_SCREENSHOOTING:+1}" \
FEATURES_THUMBNAILING="${ARG_FEATURES_THUMBNAILING:+1}"
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
mousepad \
python3 \
systemctl \
"${ARG_FEATURES_SCREENSHOOTING:+ristretto}" \
"${ARG_FEATURES_SCREENSHOOTING:+xfce4-screenshooter}" \
"${ARG_FEATURES_THUMBNAILING:+tumbler}"
#############
### stage_vnc
#############
FROM stage_tools as stage_vnc
ARG ARG_VNC_COL_DEPTH
ARG ARG_VNC_DISPLAY
ARG ARG_VNC_PORT
ARG ARG_VNC_PW
ARG ARG_VNC_RESOLUTION
ARG ARG_VNC_VIEW_ONLY
ARG ARG_TIGERVNC_DISTRO
ARG ARG_TIGERVNC_VERSION
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/tmp/g3-cache/,target=/tmp/g3-cache/ \
TIGERVNC_VERSION="${ARG_TIGERVNC_VERSION}" \
TIGERVNC_DISTRO="${ARG_TIGERVNC_DISTRO}" \
&& if [ ! -s /tmp/g3-cache/tigervnc/tigervnc-"${TIGERVNC_VERSION}"."${TIGERVNC_DISTRO}".tar.gz ] ; then \
wget --show-progress --progress=bar:force:noscroll \
-q https://sourceforge.net/projects/tigervnc/files/stable/"${TIGERVNC_VERSION}"/tigervnc-"${TIGERVNC_VERSION}"."${TIGERVNC_DISTRO}".tar.gz \
-P /tmp/g3-cache/tigervnc ; \
fi \
&& tar xzf /tmp/g3-cache/tigervnc/tigervnc-"${TIGERVNC_VERSION}"."${TIGERVNC_DISTRO}".tar.gz --strip 1 -C / \
&& ln -s /usr/libexec/vncserver /usr/bin/vncserver \
&& sed -i 's/exec(@cmd);/print "@cmd";\nexec(@cmd);/g' /usr/libexec/vncserver
ENV \
DISPLAY="${ARG_VNC_DISPLAY:-:1}" \
FEATURES_VNC=1 \
VNC_COL_DEPTH="${ARG_VNC_COL_DEPTH:-24}" \
VNC_PORT="${ARG_VNC_PORT:-5901}" \
VNC_PW="${ARG_VNC_PW:-headless}" \
VNC_RESOLUTION="${ARG_VNC_RESOLUTION:-1360x768}" \
VNC_VIEW_ONLY="${ARG_VNC_VIEW_ONLY:-false}"
EXPOSE "${VNC_PORT}"
###############
### stage_novnc
###############
FROM stage_vnc as stage_novnc
ARG ARG_APT_NO_RECOMMENDS
ARG ARG_NOVNC_PORT
ARG ARG_NOVNC_VERSION
ARG ARG_WEBSOCKIFY_VERSION
ENV \
FEATURES_BUILD_SLIM_NOVNC="${ARG_APT_NO_RECOMMENDS:+1}" \
FEATURES_NOVNC=1 \
NOVNC_HOME="/usr/libexec/noVNCdim" \
NOVNC_PORT="${ARG_NOVNC_PORT:-6901}"
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/tmp/g3-cache/,target=/tmp/g3-cache/ \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
python3-numpy \
&& mkdir -p "${NOVNC_HOME}"/utils/websockify \
&& NOVNC_VERSION="${ARG_NOVNC_VERSION}" \
&& WEBSOCKIFY_VERSION="${ARG_WEBSOCKIFY_VERSION}" \
&& if [ ! -s /tmp/g3-cache/novnc/v"${NOVNC_VERSION}".tar.gz ] ; then \
wget --show-progress --progress=bar:force:noscroll \
-q https://github.com/novnc/noVNC/archive/v"${NOVNC_VERSION}".tar.gz \
-P /tmp/g3-cache/novnc ; \
fi \
&& if [ ! -s /tmp/g3-cache/websockify/v"${WEBSOCKIFY_VERSION}".tar.gz ] ; then \
wget --show-progress --progress=bar:force:noscroll \
-q https://github.com/novnc/websockify/archive/v"${WEBSOCKIFY_VERSION}".tar.gz \
-P /tmp/g3-cache/websockify ; \
fi \
&& tar xzf /tmp/g3-cache/novnc/v"${NOVNC_VERSION}".tar.gz --strip 1 -C "${NOVNC_HOME}" \
&& tar xzf /tmp/g3-cache/websockify/v"${WEBSOCKIFY_VERSION}".tar.gz --strip 1 -C "${NOVNC_HOME}"/utils/websockify \
&& chmod 755 -v "${NOVNC_HOME}"/utils/novnc_proxy
### add 'index.html' for choosing noVNC client
RUN echo \
"<!DOCTYPE html>\n\
<html>\n\
<head>\n\
<title>noVNC</title>\n\
<meta charset=\"utf-8\"/>\n\
</head>\n\
<body>\n\
<p><a href=\"vnc_lite.html\">noVNC Lite Client</a></p>\n\
<p><a href=\"vnc.html\">noVNC Full Client</a></p>\n\
</body>\n\
</html>" \
> "${NOVNC_HOME}"/index.html
EXPOSE "${NOVNC_PORT}"
###################
### merge_stage_vnc
###################
FROM ${ARG_MERGE_STAGE_VNC_BASE} as merge_stage_vnc
ARG ARG_HEADLESS_USER_ID
ARG ARG_HEADLESS_USER_NAME
ARG ARG_HEADLESS_USER_GROUP_ID
ARG ARG_HEADLESS_USER_GROUP_NAME
ENV \
HEADLESS_USER_ID="${ARG_HEADLESS_USER_ID}" \
HEADLESS_USER_NAME="${ARG_HEADLESS_USER_NAME}" \
HEADLESS_USER_GROUP_ID="${ARG_HEADLESS_USER_GROUP_ID}" \
HEADLESS_USER_GROUP_NAME="${ARG_HEADLESS_USER_GROUP_NAME}" \
HOME="${ARG_HOME:-/home/${ARG_HEADLESS_USER_NAME}}"
WORKDIR "${HOME}"
##################
### stage_chromium
##################
FROM merge_stage_vnc as stage_chromium
ARG ARG_APT_NO_RECOMMENDS
ENV \
FEATURES_BUILD_SLIM_CHROMIUM="${ARG_APT_NO_RECOMMENDS:+1}" \
FEATURES_CHROMIUM=1
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
chromium
COPY ./xfce-chromium/src/home/Desktop "${HOME}"/Desktop/
COPY ./xfce-chromium/src/home/readme*.md "${HOME}"/
#################
### stage_firefox
#################
FROM merge_stage_vnc as stage_firefox
ARG ARG_APT_NO_RECOMMENDS
ENV \
FEATURES_BUILD_SLIM_FIREFOX="${ARG_APT_NO_RECOMMENDS:+1}" \
FEATURES_FIREFOX=1
RUN \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/cache/apt,target=/var/cache/apt \
--mount=type=cache,from=stage_cache,sharing=locked,source=/var/lib/apt,target=/var/lib/apt \
DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
firefox-esr
COPY ./xfce-firefox/src/home/Desktop "${HOME}"/Desktop/
### ##################
### stage_firefox_plus
### ##################
FROM stage_firefox as stage_firefox_plus
ENV FEATURES_FIREFOX_PLUS=1
COPY ./xfce-firefox/src/firefox.plus/home/Desktop "${HOME}"/Desktop/
COPY ./xfce-firefox/src/firefox.plus/resources "${HOME}"/firefox.plus/
COPY ./xfce-firefox/src/firefox.plus/home/readme*.md "${HOME}"/
RUN \
chmod 744 "${HOME}"/firefox.plus/*.sh \
&& envsubst <"${HOME}/Desktop/Copy FF Preferences.desktop" >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}/Desktop/Copy FF Preferences.desktop" \
&& install -o root -g root -m 644 "${HOME}"/firefox.plus/accetto.svg /usr/share/icons/hicolor/scalable/apps/ \
&& gtk-update-icon-cache -f /usr/share/icons/hicolor
#######################
### merge_stage_browser
#######################
FROM ${ARG_MERGE_STAGE_BROWSER_BASE} as merge_stage_browser
###############
### FINAL STAGE
###############
FROM ${ARG_FINAL_STAGE_BASE} as stage_final
ARG ARG_FEATURES_OVERRIDING_ENVV
ARG ARG_SUDO_INITIAL_PW
ENV \
FEATURES_OVERRIDING_ENVV="${ARG_FEATURES_OVERRIDING_ENVV:+1}" \
FEATURES_VERSION_STICKER=1 \
STARTUPDIR="/dockerstartup"
COPY ./src/xfce-startup "${STARTUPDIR}"/
COPY ./src/tests "${HOME}"/tests/
COPY ./xfce/src/home/config "${HOME}"/.config/
COPY ./xfce/src/home/Desktop "${HOME}"/Desktop/
COPY ./xfce/src/home/readme*.md "${HOME}"/
### Note that the line 'chmod 666 /etc/passwd /etc/group' sets the "softer" permissions only temporary.
### It allows the user generator startup script to configure the user and the group correctly.
### The script will set the permissions of both files back to the default '644'.
### The script will also clear the file '.initial_sudo_password' after using it.
### However, note that the initial sudo password will still be persisted in the image history.
### You have to change it inside the container, if you want to keep it really secret.
### Note that all this will not be done, if the startup script will not be executed.
RUN \
chmod 666 /etc/passwd /etc/group \
&& echo "${HEADLESS_USER_GROUP_NAME}:x:${HEADLESS_USER_GROUP_ID}:" >> /etc/group \
&& echo "${HEADLESS_USER_NAME}:x:${HEADLESS_USER_ID}:${HEADLESS_USER_GROUP_ID}:Default:${HOME}:/bin/bash" >> /etc/passwd \
&& echo "${HEADLESS_USER_NAME} ALL=(ALL:ALL) ALL" | sudo tee /etc/sudoers.d/"${HEADLESS_USER_NAME}" \
&& echo "${ARG_SUDO_INITIAL_PW:-headless}" > "${STARTUPDIR}"/.initial_sudo_password \
&& echo "${HEADLESS_USER_NAME}:$(cat "${STARTUPDIR}"/.initial_sudo_password)" | chpasswd \
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
USER "${HEADLESS_USER_ID}"
ENTRYPOINT [ "/usr/bin/tini", "--", "/dockerstartup/startup.sh" ]
# RUN chmod 644 /etc/passwd /etc/group
# ENTRYPOINT [ "/usr/bin/tini", "--", "tail", "-f", "/dev/null" ]
##################
### METADATA STAGE
##################
FROM stage_final as stage_metadata
ARG ARG_CREATED
ARG ARG_DOCKER_TAG
ARG ARG_VCS_REF
ARG ARG_VERSION_STICKER
LABEL \
org.opencontainers.image.authors="accetto" \
org.opencontainers.image.created="${ARG_CREATED}" \
org.opencontainers.image.description="Headless Debian/Xfce/VNC/noVNC containers with Internet browsers" \
org.opencontainers.image.documentation="https://github.com/accetto/debian-vnc-xfce-g3" \
org.opencontainers.image.source="https://github.com/accetto/debian-vnc-xfce-g3" \
org.opencontainers.image.title="accetto/debian-vnc-xfce-g3" \
org.opencontainers.image.url="https://github.com/accetto/debian-vnc-xfce-g3" \
org.opencontainers.image.vendor="https://github.com/accetto" \
org.opencontainers.image.version="${ARG_DOCKER_TAG}"
LABEL \
org.label-schema.vcs-url="https://github.com/accetto/debian-vnc-xfce-g3" \
org.label-schema.vcs-ref="${ARG_VCS_REF}"
LABEL \
any.accetto.version-sticker="${ARG_VERSION_STICKER}"

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -49,7 +49,8 @@ DOCKER_REPO="${_owner}/${BUILDER_REPO:?Need builder repo name}"
declare _deploy_repo
### array of the image tags to be deployed
### arrays of the image tags to be deployed
declare -a _deploy_builder_tags
declare -a _deploy_tags
declare _deploytag
@@ -124,10 +125,16 @@ case "${_branch}" in
### choose the Dockerfile
case "${_blend}" in
latest | latest-chromium | latest-firefox)
latest | latest-chromium | latest-firefox | bookworm | bookworm-chromium | bookworm-firefox)
BASETAG="12-slim"
DOCKERFILE_PATH="${_build_context}/Dockerfile.xfce.12"
;;
bullseye | bullseye-chromium | bullseye-firefox)
BASETAG="11-slim"
DOCKERFILE_PATH="${_build_context}/Dockerfile.xfce"
DOCKERFILE_PATH="${_build_context}/Dockerfile.xfce.11"
;;
* )
@@ -138,7 +145,10 @@ case "${_branch}" in
### set the building parameters
case "${_blend}" in
latest | latest-chromium | latest-firefox )
latest | latest-chromium | latest-firefox \
| bookworm | bookworm-chromium | bookworm-firefox \
| bullseye | bullseye-chromium | bullseye-firefox \
)
### this feature is enabled by default
### however, it can be disabled via environment variables (export FEATURES_NOVNC=0)
@@ -191,8 +201,36 @@ case "${_branch}" in
fi
### normalize deployment tags
DOCKER_TAG="${_blend}"
_deploy_tags=( "latest" )
case "${_blend}" in
latest | latest-* )
### latest -> 12
DOCKER_TAG="${_blend}"
_deploy_tags=( "latest" "12" )
_deploy_builder_tags=( "${_blend}" "${_blend/latest/12}" )
;;
bookworm | bookworm-* )
### bookworm -> 12
DOCKER_TAG="${_blend/bookworm/12}"
_deploy_tags=( "latest" "12" )
_deploy_builder_tags=( "${_blend/bookworm/latest}" "${_blend/bookworm/12}" )
;;
bullseye | bullseye-* )
### bullseye -> 11
DOCKER_TAG="${_blend/bullseye/11}"
_deploy_tags=( "11" )
_deploy_builder_tags=( "${_blend/bullseye/11}" )
;;
* )
die "Unsupported blend '${_blend}'"
;;
esac
### add optional suffixes to deployment tags
@@ -223,4 +261,4 @@ case "${_branch}" in
* )
die "Unsupported branch '${_branch}'"
;;
esac
esac

View File

@@ -23,6 +23,7 @@ main() {
local version_sticker_verbose
local repo_building="${DOCKER_REPO##*/}"
local repo_deploy="${_deploy_repo##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"
### debugging support
# dump_environment
@@ -37,14 +38,17 @@ main() {
then
### get values for badges from the image metadata (labels)
created=$( get_label "${DOCKER_REPO}:${DOCKER_TAG}" "org.opencontainers.image.created" )
version_sticker=$( get_label "${DOCKER_REPO}:${DOCKER_TAG}" "any.accetto.version-sticker" )
created=$( get_label "${DOCKER_REPO}:${keeper_repo_tag}" "org.opencontainers.image.created" )
version_sticker=$( get_label "${DOCKER_REPO}:${keeper_repo_tag}" "any.accetto.version-sticker" )
version_sticker_verbose=$( cat "${_build_context}/${_scrap_version_sticker_verbose_current}" )
### update badge endpoints in the builder repository gist
update_gist "${GIST_ID}" "${_gist_key_created}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${created}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${version_sticker}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker_verbose}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${version_sticker_verbose}"
for t in "${_deploy_builder_tags[@]}" ; do
update_gist "${GIST_ID}" "${_gist_key_created}" "${DOCKER_REPO}" "${t}" "${created}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker}" "${DOCKER_REPO}" "${t}" "${version_sticker}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker_verbose}" "${DOCKER_REPO}" "${t}" "${version_sticker_verbose}"
done
else
echo "Skipping builder gist update because of null or prohibited target repositories."
@@ -57,7 +61,7 @@ main() {
### note that the builder and deployment repositories could be identical
### in that case skip the tag which has been already published above
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${DOCKER_TAG}" != "${t}" ]] ; then
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${keeper_repo_tag}" != "${t}" ]] ; then
update_gist "${DEPLOY_GIST_ID}" "${_gist_key_created}" "${_deploy_repo}" "${t}" "${created}"
update_gist "${DEPLOY_GIST_ID}" "${_gist_key_version_sticker}" "${_deploy_repo}" "${t}" "${version_sticker}"

View File

@@ -11,6 +11,7 @@ source "${_mydir}"/util.rc
deployment_push() {
local target
local repo="${_deploy_repo##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"
if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then
@@ -19,24 +20,26 @@ deployment_push() {
### note that the builder and deployment repositories could be identical
### in that case skip the tag which has been already published above
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${DOCKER_TAG}" != "${t}" ]] ; then
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${keeper_repo_tag}" != "${t}" ]] ; then
target="${_deploy_repo}:${t}"
echo ; echo "Deploying image '${target}'"
docker tag "${DOCKER_REPO}:${DOCKER_TAG}" "${target}"
docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
docker push "${target}"
docker rmi "${target}"
fi
done
else
echo "Skipping push because of null or prohibited deployment repository '${repo}'."
echo "Skipping deployment repo push because of null or prohibited deployment repository '${repo}'."
fi
}
main() {
local target
local repo="${DOCKER_REPO##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"
if [[ -f "${_build_context}/${_scrap_demand_stop_building}" ]] ; then
echo "Skipping push on demand."
@@ -66,11 +69,27 @@ main() {
if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then
echo ; echo "Pushing builder image ${DOCKER_REPO}:${DOCKER_TAG}"
docker push ${DOCKER_REPO}:${DOCKER_TAG}
### push all target tags into the builder repository
for t in "${_deploy_builder_tags[@]}" ; do
echo ; echo "Pushing builder image ${DOCKER_REPO}:${t}"
if [[ "${t}" == "${keeper_repo_tag}" ]] ; then
# first element is the master repo (a keeper)
docker push "${DOCKER_REPO}:${t}"
else
target="${DOCKER_REPO}:${t}"
docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
docker push "${target}"
docker rmi "${target}"
fi
done
else
echo "Skipping forced push because of null or prohibited builder repository '${repo}'."
echo "Skipping forced builder repo push because of null or prohibited builder repository '${repo}'."
fi
fi

View File

@@ -8,7 +8,7 @@ case "$1" in
echo $(ng --version 2>/dev/null | grep -Po -m1 '(?<=Angular CLI:\s)[0-9.]+')
;;
chromium | chromium-browser)
### source example: Chromium 109.0.5414.119 built on Debian 11.6, running on Debian 11.6
### source example: Chromium 115.0.5790.170 built on Debian 12.1, running on Debian 12.1
echo $(chromium --version 2>/dev/null | grep -Po -m1 '(?<=Chromium\s)[0-9.]+')
;;
code | vsc | vscode | visual-studio-code | visualstudiocode )

View File

@@ -12,7 +12,7 @@
This Docker Hub repository contains Docker images for headless working.
The images are based on [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The images are based on the current [Debian 12][docker-debian] and the previous [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The popular web browser [Chromium][chromium] is also included.
This [User guide][this-user-guide] describes the images and how to use them.
@@ -25,11 +25,16 @@ The following image tags are regularly built and published on Docker Hub:
<!-- markdownlint-disable MD052 -->
- `latest` based on `Debian 11`
- `latest` (also as `12`) based on `Debian 12`
![badge_latest_created][badge_latest_created]
[![badge_latest_version-sticker][badge_latest_version-sticker]][link_latest_version-sticker-verbose]
- `11` based on `Debian 11`
![badge_11_created][badge_11_created]
[![badge_11_version-sticker][badge_11_version-sticker]][link_11_version-sticker-verbose]
<!-- markdownlint-enable MD052 -->
**Hint:** Clicking the version sticker badge reveals more information about the particular build.
@@ -97,7 +102,7 @@ If you have a question or an idea and you don't want to open an issue, you can a
[this-dockerfile]: https://github.com/accetto/debian-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/debian-vnc-xfce-chromium-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/animation-debian-vnc-xfce-chromium-g3.gif
[accetto-dockerhub-ubuntu-vnc-xfce-chromium-g3]: https://hub.docker.com/r/accetto/ubuntu-vnc-xfce-chromium-g3

View File

@@ -8,3 +8,11 @@
[badge_latest_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker.json
[link_latest_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker-verbose.txt
<!-- 11 -->
[badge_11_created]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@created.json
[badge_11_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker.json
[link_11_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker-verbose.txt

View File

@@ -12,7 +12,7 @@
This Docker Hub repository contains Docker images for headless working.
The images are based on [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The images are based on the current [Debian 12][docker-debian] and the previous [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The popular web browser [Firefox][firefox] is also included.
This [User guide][this-user-guide] describes the images and how to use them.
@@ -25,11 +25,16 @@ The following image tags are regularly built and published on Docker Hub:
<!-- markdownlint-disable MD052 -->
- `latest` based on `Debian 11`
- `latest` (also as `12`) based on `Debian 12`
![badge_latest_created][badge_latest_created]
[![badge_latest_version-sticker][badge_latest_version-sticker]][link_latest_version-sticker-verbose]
- `11` based on `Debian 11`
![badge_11_created][badge_11_created]
[![badge_11_version-sticker][badge_11_version-sticker]][link_11_version-sticker-verbose]
<!-- markdownlint-enable MD052 -->
**Hint:** Clicking the version sticker badge reveals more information about the particular build.
@@ -95,7 +100,7 @@ If you have a question or an idea and you don't want to open an issue, you can a
[this-dockerfile]: https://github.com/accetto/debian-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/debian-vnc-xfce-firefox-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/animation-debian-vnc-xfce-firefox-g3.gif
[accetto-dockerhub-ubuntu-vnc-xfce-firefox-g3]: https://hub.docker.com/r/accetto/ubuntu-vnc-xfce-firefox-g3

View File

@@ -8,3 +8,11 @@
[badge_latest_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker.json
[link_latest_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker-verbose.txt
<!-- 11 -->
[badge_11_created]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@created.json
[badge_11_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker.json
[link_11_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker-verbose.txt

View File

@@ -12,7 +12,7 @@
This Docker Hub repository contains Docker images for headless working.
The images are based on [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
The images are based on the current [Debian 12][docker-debian] and the previous [Debian 11][docker-debian] and include [Xfce][xfce] desktop, [TigerVNC][tigervnc] server and [noVNC][novnc] client.
This [User guide][this-user-guide] describes the images and how to use them.
@@ -24,11 +24,16 @@ The following image tags are regularly built and published on Docker Hub:
<!-- markdownlint-disable MD052 -->
- `latest` based on `Debian 11`
- `latest` (also as `12`) based on `Debian 12`
![badge_latest_created][badge_latest_created]
[![badge_latest_version-sticker][badge_latest_version-sticker]][link_latest_version-sticker-verbose]
- `11` based on `Debian 11`
![badge_11_created][badge_11_created]
[![badge_11_version-sticker][badge_11_version-sticker]][link_11_version-sticker-verbose]
<!-- markdownlint-enable MD052 -->
**Hint:** Clicking the version sticker badge reveals more information about the particular build.
@@ -91,7 +96,7 @@ If you have a question or an idea and you don't want to open an issue, you can a
[this-dockerfile]: https://github.com/accetto/debian-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/debian-vnc-xfce-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/debian-vnc-xfce-g3/master/docker/doc/images/animation-debian-vnc-xfce-g3.gif
[accetto-dockerhub-ubuntu-vnc-xfce-g3]: https://hub.docker.com/r/accetto/ubuntu-vnc-xfce-g3

View File

@@ -8,3 +8,15 @@
[badge_latest_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker.json
[link_latest_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@latest@version-sticker-verbose.txt
<!-- 11 -->
[badge_11_created]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@created.json
[badge_11_version-sticker]: https://badgen.net/https/gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker.json
[link_11_version-sticker-verbose]: https://gist.githubusercontent.com/${OWNER}/${GIST}/raw/${REPO}@11@version-sticker-verbose.txt

View File

@@ -21,6 +21,8 @@
- [Disabling `noVNC`](#disabling-novnc)
- [Disabling `Firefox Plus`](#disabling-firefox-plus)
- [README files for Docker Hub](#readme-files-for-docker-hub)
- [Tips and examples](#tips-and-examples)
- [How to deploy all images into one repository](#how-to-deploy-all-images-into-one-repository)
## Introduction
@@ -360,6 +362,40 @@ For example, the `README` file for the repository `accetto/debian-vnc-xfce-g3` c
./util-readme.sh --repo accetto/debian-vnc-xfce-g3 --context=../docker/xfce -- preview
```
## Tips and examples
### How to deploy all images into one repository
There are three deployment repositories by default.
Their names are defined by the following environment variables:
- `DEPLOYMENT_REPO` for generic images
- `DEPLOYMENT_REPO_CHROMIUM` for images with Chromium
- `DEPLOYMENT_REPO_FIREFOX` for images with Firefox
The forth variable `BUILDER_REPO` defines the name of the *builder repository*, which is not used for deployment by default.
However, the images can be optionally published also into the *builder repository* by setting the environment variable `FORCE_PUBLISHING_BUILDER_REPO=1`.
The images in the builder repository are distinguished by their tags.
On the other hand, if the repository environment variables are unset or set to the reserved value `void`, then the deployment into the related repository will be skipped.
This behaviour can be used, if you want to publish all the images into a single repository.
Simply set all repositories except the builder one to `void` and force the publishing into the builder repository.
For example, for publishing all the images into a single repository `headless-debian-g3` set the variables like this:
```shell
DEPLOYMENT_REPO="void"
DEPLOYMENT_REPO_CHROMIUM="void"
DEPLOYMENT_REPO_FIREFOX="void"
BUILDER_REPO="headless-debian-g3"
FORCE_PUBLISHING_BUILDER_REPO=1
```
***
[accetto-github-ubuntu-vnc-xfce-g3]: https://github.com/accetto/ubuntu-vnc-xfce-g3