Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 93515c7dfa | |||
| bdacf64e1d | |||
| 5222ada048 | |||
| 1498941651 | |||
| fb8a52cd7a | |||
| ac70dbfc74 | |||
| 39e366dea2 |
@@ -6,6 +6,27 @@
|
||||
|
||||
***
|
||||
|
||||
### Release 23.12
|
||||
|
||||
This is a maintenance release.
|
||||
|
||||
- Updated Dockerfiles
|
||||
- file `.bashrc` is created earlier (stage `merge_stage_vnc`)
|
||||
- Updated file `example-secrets.rc`
|
||||
- removed the initialization of the variables `FORCE_BUILDING` and `FORCE_PUBLISHING_BUILDER_REPO` (unset means `0`)
|
||||
- the variables are still used as before, but now they can be set individually for each building/publishing run
|
||||
|
||||
### 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 +36,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`
|
||||
|
||||
|
||||
+1
-1
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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 )
|
||||
|
||||
@@ -237,6 +237,9 @@ ENV \
|
||||
|
||||
WORKDIR "${HOME}"
|
||||
|
||||
### add '.bashrc' and similar resources
|
||||
COPY ./src/home "${HOME}"/
|
||||
|
||||
|
||||
##################
|
||||
### stage_chromium
|
||||
|
||||
@@ -237,6 +237,9 @@ ENV \
|
||||
|
||||
WORKDIR "${HOME}"
|
||||
|
||||
### add '.bashrc' and similar resources
|
||||
COPY ./src/home "${HOME}"/
|
||||
|
||||
|
||||
##################
|
||||
### stage_chromium
|
||||
|
||||
+5
-1
@@ -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 $@
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
@@ -34,7 +34,7 @@ main() {
|
||||
if [[ -n "${GIST_TOKEN}" && -n "${GIST_ID}" && -n "${DEPLOY_GIST_ID}" ]] ; then
|
||||
|
||||
if [[ ( -n "${repo_deploy}" && "${repo_deploy}" != "${_prohibited_repo_name}" ) \
|
||||
|| ( "${FORCE_PUBLISHING_BUILDER_REPO}" == "1" && -n "${repo_building}" && "${repo_building}" != "${_prohibited_repo_name}" ) ]] ; \
|
||||
|| ( "${FORCE_PUBLISHING_BUILDER_REPO:-0}" == "1" && -n "${repo_building}" && "${repo_building}" != "${_prohibited_repo_name}" ) ]] ; \
|
||||
then
|
||||
|
||||
### get values for badges from the image metadata (labels)
|
||||
|
||||
@@ -13,7 +13,7 @@ main() {
|
||||
local version_sticker
|
||||
local -i exit_code=0
|
||||
|
||||
local should_build=${FORCE_BUILDING}
|
||||
local should_build=${FORCE_BUILDING:-0}
|
||||
local build_prohibited=${PROHIBIT_BUILDING}
|
||||
local cache_script="cache"
|
||||
|
||||
@@ -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 )"
|
||||
|
||||
+20
-1
@@ -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."
|
||||
@@ -65,7 +73,7 @@ main() {
|
||||
fi
|
||||
|
||||
### push images into the builder repository
|
||||
if [[ "${FORCE_PUBLISHING_BUILDER_REPO}" == "1" ]] ; then
|
||||
if [[ "${FORCE_PUBLISHING_BUILDER_REPO:-0}" == "1" ]] ; then
|
||||
|
||||
if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
@@ -48,12 +48,12 @@ export DOCKER_BUILDKIT=1
|
||||
# export BUILDER_REPO=""
|
||||
# ### shared g3-cache is outside the Docker building context
|
||||
# export SHARED_G3_CACHE_PATH=""
|
||||
# ### building process control
|
||||
# # export FORCE_PUBLISHING_BUILDER_REPO=1
|
||||
# export FORCE_BUILDING=0
|
||||
# ### used to control building/publishing (unset means '0')
|
||||
# export FORCE_PUBLISHING_BUILDER_REPO=1
|
||||
# export FORCE_BUILDING=1
|
||||
# ### used by the 'post_push' hook script, which normally removes the helper files
|
||||
# # export KEEP_HELPER_FILES=0
|
||||
### explicitly disable features that are enabled by default
|
||||
# ### explicitly disable features that are enabled by default
|
||||
# # export FEATURES_NOVNC=0
|
||||
# # export FEATURES_FIREFOX_PLUS=0
|
||||
# # export FEATURES_OVERRIDING_ENVV=0
|
||||
@@ -82,9 +82,9 @@ export DOCKER_BUILDKIT=1
|
||||
# export BUILDER_REPO=""
|
||||
# ### shared g3-cache is outside the Docker building context
|
||||
# export SHARED_G3_CACHE_PATH=""
|
||||
# ### building process control
|
||||
# export FORCE_PUBLISHING_BUILDER_REPO=0
|
||||
# export FORCE_BUILDING=0
|
||||
# ### used to control building/publishing (unset means '0')
|
||||
# export FORCE_PUBLISHING_BUILDER_REPO=1
|
||||
# export FORCE_BUILDING=1
|
||||
# ### used by the 'post_push' hook script, which normally removes the helper files
|
||||
# export KEEP_HELPER_FILES=0
|
||||
# ### explicitly disable features that are enabled by default
|
||||
|
||||
Reference in New Issue
Block a user