Compare commits
6 Commits
FirstDebia
...
v23.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdacf64e1d | ||
|
|
5222ada048 | ||
|
|
1498941651 | ||
|
|
fb8a52cd7a | ||
|
|
ac70dbfc74 | ||
|
|
39e366dea2 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -6,6 +6,17 @@
|
||||
|
||||
***
|
||||
|
||||
### Release 23.11
|
||||
|
||||
- Added file `$HOME/.bashrc` to all images.
|
||||
It contains examples of custom aliases
|
||||
- `ll` - just `ls -l`
|
||||
- `cls` - clears the terminal window
|
||||
- `ps1` - sets the command prompt text
|
||||
|
||||
- Added more 'die-fast' error handling into the building and publishing scripts.
|
||||
They exit immediately if the image building or pushing commands fail.
|
||||
|
||||
### Release 23.08.1 (Milestone)
|
||||
|
||||
This release brings new images based on the current **Debian 12**.
|
||||
@@ -15,6 +26,7 @@ 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
|
||||
- also less image pollution by publishing
|
||||
- file `readme-local-building-example.md` got a new section `Tips and examples`, containing
|
||||
- `How to deploy all images into one repository`
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ die() {
|
||||
local -i code=${2:-1}
|
||||
local place="${3:-$0}"
|
||||
|
||||
echo -e "EXITING '${place}' with code ${code}: ${message}" >&2
|
||||
echo -e "EXITING at line "${BASH_LINENO[0]}" in '${place}' with code ${code}: ${message}" >&2
|
||||
exit ${code}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ die() {
|
||||
local -i code=${2:-1}
|
||||
local place="${3:-$0}"
|
||||
|
||||
echo -e "\nEXITING '${place}' with code ${code}: ${message}\n" >&2
|
||||
echo -e "\nEXITING at line "${BASH_LINENO[0]}" in '${place}' with code ${code}: ${message}\n" >&2
|
||||
exit ${code}
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ main() {
|
||||
pivotal )
|
||||
|
||||
clear_log
|
||||
build_group "${command}" "latest" "latest-firefox" "latest-chromium"
|
||||
build_group "${command}" "latest" "bullseye" "latest-firefox" "bullseye-firefox" "latest-chromium" "bullseye-chromium"
|
||||
;;
|
||||
|
||||
complete )
|
||||
|
||||
@@ -320,6 +320,7 @@ ENV \
|
||||
|
||||
COPY ./src/xfce-startup "${STARTUPDIR}"/
|
||||
COPY ./src/tests "${HOME}"/tests/
|
||||
COPY ./src/home "${HOME}"/
|
||||
|
||||
COPY ./xfce/src/home/config "${HOME}"/.config/
|
||||
COPY ./xfce/src/home/Desktop "${HOME}"/Desktop/
|
||||
|
||||
@@ -320,6 +320,7 @@ ENV \
|
||||
|
||||
COPY ./src/xfce-startup "${STARTUPDIR}"/
|
||||
COPY ./src/tests "${HOME}"/tests/
|
||||
COPY ./src/home "${HOME}"/
|
||||
|
||||
COPY ./xfce/src/home/config "${HOME}"/.config/
|
||||
COPY ./xfce/src/home/Desktop "${HOME}"/Desktop/
|
||||
|
||||
@@ -62,8 +62,8 @@ main() {
|
||||
now="$(date --utc +%FT%TZ)"
|
||||
echo "Current timestamp: ${now}" ; echo
|
||||
|
||||
### no quotes around ${params}!
|
||||
set -x
|
||||
### no quotes around 'params'
|
||||
docker build ${params} \
|
||||
-f "${DOCKERFILE_PATH}" \
|
||||
--build-arg BASEIMAGE="${BASEIMAGE}" \
|
||||
@@ -91,7 +91,11 @@ main() {
|
||||
${FEATURES_FIREFOX_PLUS:+--build-arg ARG_MERGE_STAGE_BROWSER_BASE="stage_firefox_plus"} \
|
||||
\
|
||||
-t "${DOCKER_REPO}:${DOCKER_TAG}${target_stage:+_${target_stage}}" "${_build_context}"
|
||||
|
||||
exit_code=$?
|
||||
set +x
|
||||
|
||||
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
@@ -5,7 +5,7 @@ die() {
|
||||
local -i code=${2:-1}
|
||||
local place="${3:-$0}"
|
||||
|
||||
echo -e "EXITING '${place}' with code ${code}: ${message}" >&2
|
||||
echo -e "EXITING at line "${BASH_LINENO[0]}" in '${place}' with code ${code}: ${message}" >&2
|
||||
exit ${code}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ if [[ $# -ge 2 ]] ; then shift 2 ; fi
|
||||
### Remark: There are also 'FEATURES_*' variables that are always set, e.g. 'FEATURES_VERSION_STICKER=1'.
|
||||
|
||||
### These features influence the content of almost all stages:
|
||||
### Warning! Anything except '0' means '1', even unset or emty.
|
||||
### Warning! Anything except '0' means '1', even unset or empty.
|
||||
if [[ "${FEATURES_BUILD_SLIM}" == "0" ]] ; then FEATURES_BUILD_SLIM="" ; else FEATURES_BUILD_SLIM=1 ; fi
|
||||
|
||||
### These features influence the content of the related stages:
|
||||
@@ -90,7 +90,7 @@ if [[ "${FEATURES_CHROMIUM}" == "1" ]] ; then FEATURES_CHROMIUM=1 ; else FEATURE
|
||||
if [[ "${FEATURES_FIREFOX}" == "1" ]] ; then FEATURES_FIREFOX=1 ; else FEATURES_FIREFOX="" ; fi
|
||||
|
||||
### These features influence container behaviour at startup time
|
||||
### Warning! Anything except '0' means '1', even unset or emty.
|
||||
### Warning! Anything except '0' means '1', even unset or empty.
|
||||
if [[ "${FEATURES_OVERRIDING_ENVV}" == "0" ]] ; then FEATURES_OVERRIDING_ENVV="" ; else FEATURES_OVERRIDING_ENVV=1 ; fi
|
||||
|
||||
### These features are always enabled and cannot be disabled via environment variables
|
||||
|
||||
@@ -57,8 +57,9 @@ main() {
|
||||
fi
|
||||
|
||||
### build a temporary helper image for getting the current version sticker values
|
||||
|
||||
### no quotes around ${params}!
|
||||
set -x
|
||||
### no quotes around 'params'
|
||||
docker build ${params} \
|
||||
-f "${DOCKERFILE_PATH}" \
|
||||
--build-arg BASEIMAGE="${BASEIMAGE}" \
|
||||
@@ -82,8 +83,12 @@ main() {
|
||||
${FEATURES_FIREFOX_PLUS:+--build-arg ARG_MERGE_STAGE_BROWSER_BASE="stage_firefox_plus"} \
|
||||
\
|
||||
-t "${DOCKER_REPO}":"${DOCKER_TAG}${helper_suffix}" "${_build_context}"
|
||||
|
||||
exit_code=$?
|
||||
set +x
|
||||
|
||||
if [[ ${exit_code} -ne 0 ]] ; then set +x; die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}${helper_suffix}'" ${exit_code} ; fi
|
||||
|
||||
### get the actual verbose version sticker value from the helper image and store it as the current one
|
||||
### note that some apps require display to report their versions correctly (e.g. Ristretto or Screenshooter)
|
||||
# version_sticker="$( docker run --rm ${DOCKER_REPO}:${DOCKER_TAG}${helper_suffix} --skip-vnc --version-sticker-verbose )"
|
||||
|
||||
@@ -12,6 +12,7 @@ deployment_push() {
|
||||
local target
|
||||
local repo="${_deploy_repo##*/}"
|
||||
local keeper_repo_tag="${_deploy_builder_tags[0]}"
|
||||
local -i exit_code=0
|
||||
|
||||
if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then
|
||||
|
||||
@@ -27,7 +28,13 @@ deployment_push() {
|
||||
echo ; echo "Deploying image '${target}'"
|
||||
docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
|
||||
docker push "${target}"
|
||||
exit_code=$?
|
||||
docker rmi "${target}"
|
||||
|
||||
if [[ ${exit_code} -ne 0 ]] ; then
|
||||
docker logout
|
||||
die "Unable to push image '${target}'" ${exit_code}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -40,6 +47,7 @@ main() {
|
||||
local target
|
||||
local repo="${DOCKER_REPO##*/}"
|
||||
local keeper_repo_tag="${_deploy_builder_tags[0]}"
|
||||
local -i exit_code=0
|
||||
|
||||
if [[ -f "${_build_context}/${_scrap_demand_stop_building}" ]] ; then
|
||||
echo "Skipping push on demand."
|
||||
@@ -78,13 +86,24 @@ main() {
|
||||
|
||||
# first element is the master repo (a keeper)
|
||||
docker push "${DOCKER_REPO}:${t}"
|
||||
exit_code=$?
|
||||
|
||||
if [[ ${exit_code} -ne 0 ]] ; then
|
||||
docker logout
|
||||
die "Unable to push image '${DOCKER_REPO}:${t}'" ${exit_code}
|
||||
fi
|
||||
else
|
||||
target="${DOCKER_REPO}:${t}"
|
||||
|
||||
docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
|
||||
docker push "${target}"
|
||||
exit_code=$?
|
||||
docker rmi "${target}"
|
||||
|
||||
if [[ ${exit_code} -ne 0 ]] ; then
|
||||
docker logout
|
||||
die "Unable to push image '${target}'" ${exit_code}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
18
docker/src/home/.bashrc
Normal file
18
docker/src/home/.bashrc
Normal file
@@ -0,0 +1,18 @@
|
||||
### some examples of custom aliases
|
||||
|
||||
alias ll="ls -l"
|
||||
|
||||
### clear terminal window
|
||||
alias cls='printf "\033c"'
|
||||
|
||||
### change terminal prompt text
|
||||
fn_ps1() {
|
||||
if [ $# -gt 0 ] ; then
|
||||
### given value in bold green
|
||||
PS1="\[\033[01;32m\]$1\[\033[00m\]> "
|
||||
else
|
||||
### basename of the current working directory in bold blue
|
||||
PS1='\[\033[01;34m\]\W\[\033[00m\]> '
|
||||
fi
|
||||
}
|
||||
alias ps1='fn_ps1'
|
||||
Reference in New Issue
Block a user