Skip to content

Commit

Permalink
Release 23.03.1
Browse files Browse the repository at this point in the history
  • Loading branch information
accetto committed Mar 12, 2023
1 parent 9019761 commit 5dd5f46
Show file tree
Hide file tree
Showing 20 changed files with 280 additions and 97 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

***

### Release 23.03.1

This is a maintenance release aiming to improve the scripts and documentation.

### Release 23.03

- updated with `TigerVNC 1.13.1` bugfix release
Expand Down
97 changes: 49 additions & 48 deletions README.md

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions docker/Dockerfile.xfce.22-04
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ Pin-Priority: 501" \
> /etc/apt/preferences.d/mozilla-firefox \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y "${ARG_APT_NO_RECOMMENDS:+--no-install-recommends}" \
firefox \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
firefox

COPY ./xfce-firefox/src/home/Desktop "${HOME}"/Desktop/

Expand Down
3 changes: 1 addition & 2 deletions docker/hooks/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"

Expand Down Expand Up @@ -66,7 +66,6 @@ main() {
### no quotes around 'params'
docker build ${params} \
-f "${DOCKERFILE_PATH}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg BASEIMAGE="${BASEIMAGE}" \
--build-arg BASETAG="${BASETAG}" \
--build-arg ARG_CREATED="${now}" \
Expand Down
4 changes: 2 additions & 2 deletions docker/hooks/cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -e
#!/bin/bash

### @accetto, September 2022

echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"
Expand Down Expand Up @@ -187,7 +188,6 @@ main() {

declare _quiet=""
declare _mark="\n==> G3-CACHE"
declare _script_release_of="release_of"
declare _cache="${_build_context}/.g3-cache"
declare _shared_cache_path="${SHARED_G3_CACHE_PATH}"

Expand Down
6 changes: 6 additions & 0 deletions docker/hooks/env.rc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ case "${_branch}" in
if [[ "${_blend}" =~ chromium ]] ; then

FEATURES_CHROMIUM=1

CHROMIUM_VERSION=$( "${_mydir}"/${_script_release_of} 'chromium-1804' )

if [[ $? -ne 0 ]] ; then
echo "${CHROMIUM_VERSION}"
exit 1
fi

_deploy_repo="${_owner}/${DEPLOYMENT_REPO_CHROMIUM}"
_readme_context="docker/xfce-chromium"
Expand Down
2 changes: 1 addition & 1 deletion docker/hooks/post_push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

### 2022-09-11 Warning
### It seems like the README publishing is currently not always working.
Expand Down
3 changes: 1 addition & 2 deletions docker/hooks/pre_build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"

Expand Down Expand Up @@ -61,7 +61,6 @@ main() {
### no quotes around 'params'
docker build ${params} \
-f "${DOCKERFILE_PATH}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg BASEIMAGE="${BASEIMAGE}" \
--build-arg BASETAG="${BASETAG}" \
\
Expand Down
3 changes: 2 additions & 1 deletion docker/hooks/push
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -e
#!/bin/bash

### @accetto, August 2021

echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"
Expand Down
6 changes: 3 additions & 3 deletions docker/hooks/release_of
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

main() {
local result=""
Expand All @@ -7,7 +7,7 @@ main() {

chromium-1804 )
# result=$(wget -qO- \
result=$(curl -sL \
result=$(curl -sLN \
http://archive.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/ \
| grep -Po -m1 '(?<=href=")[^_]*_([0-9.]+-0ubuntu\d+\.18\.04\.[^_"]*)_[^"]*' \
| cut -d _ -f 2 \
Expand All @@ -25,7 +25,7 @@ main() {

echo "${result}"
else
echo "Exiting '${0}' with code '1' because not able to get version of '$1'"
echo "Exiting '${0}' with code '1' because unable to get version of '$1'"
return 1
fi
}
Expand Down
9 changes: 7 additions & 2 deletions docker/xfce-firefox/README-dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@

***

**Warning** about the images with Firefox
**Remarks** about the images with Firefox

There is no single-process Firefox image in this repository any more and the **multi-process mode** is always enabled. Be aware, that the multi-process mode requires larger shared memory (`/dev/shm`). At least 256MB is recommended. Please check the **Firefox multi-process** page in this older sibling [Wiki][that-wiki-firefox-multiprocess] for more information and the instructions, how to set the shared memory size in different scenarios.

The [Firefox][firefox] installed in the images based on `Ubuntu 22.04 LTS` is the current non-snap version from the Mozilla Team PPA. It's because the `Ubuntu 22.04 LTS` distribution contains only the `snap` version and the `snap` is currently not working correctly in Docker containers.

***

### Introduction
Expand Down Expand Up @@ -142,7 +144,10 @@ The main features and components of the images in the default configuration are:
- current version of [tini][tini] as the entry-point initial process (PID 1)
- support for overriding both the container user and the group
- support of **version sticker** (see the [full-length README][this-readme-full] on the **GitHub**)
- current version of [Firefox][firefox] web browser and some additional **Firefox plus features** described in the [full-length README][this-readme-full] on the GitHub
- [Firefox][firefox] web browser
- images based on `Ubuntu 20.04 LTS` - current version from the `Ubuntu 20.04 LTS` distribution
- images based on `Ubuntu 22.04 LTS` - current non-snap version from the Mozilla Team PPA
- additional **Firefox plus features** described in the [full-length README][this-readme-full] on the **GitHub**

The history of notable changes is documented in the [CHANGELOG][this-changelog].

Expand Down
9 changes: 7 additions & 2 deletions docker/xfce-firefox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@

***

**Warning** about the images with Firefox
**Remarks** about the images with Firefox

There is no single-process Firefox image in this repository any more and the **multi-process mode** is always enabled. Be aware, that the multi-process mode requires larger shared memory (`/dev/shm`). At least 256MB is recommended. Please check the **Firefox multi-process** page in this older sibling [Wiki][that-wiki-firefox-multiprocess] for more information and the instructions, how to set the shared memory size in different scenarios.

The [Firefox][firefox] installed in the images based on `Ubuntu 22.04 LTS` is the current non-snap version from the Mozilla Team PPA. It's because the `Ubuntu 22.04 LTS` distribution contains only the `snap` version and the `snap` is currently not working correctly in Docker containers.

***

### Introduction
Expand Down Expand Up @@ -162,7 +164,10 @@ The main features and components of the images in the default configuration are:
- current version of [tini][tini] as the entry-point initial process (PID 1)
- support for overriding both the container user and the group
- support of **version sticker** (see below)
- current version of [Firefox][firefox] web browser and some additional **Firefox plus features** described below
- [Firefox][firefox] web browser
- images based on `Ubuntu 20.04 LTS` - current version from the `Ubuntu 20.04 LTS` distribution
- images based on `Ubuntu 22.04 LTS` - current non-snap version from the Mozilla Team PPA
- additional **Firefox plus features** described below

The history of notable changes is documented in the [CHANGELOG][this-changelog].

Expand Down
2 changes: 1 addition & 1 deletion docker/xfce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The fastest way to build the images:
### PWD = project root
### prepare and source the 'secrets.rc' file first (see 'example-secrets.rc')

### examples of building and publishing the individual images
### examples of building and publishing the individual images
./builder.sh latest all

### just building the image, skipping the publishing and the version sticker update
Expand Down
Binary file removed docker/xfce/src/home/config/dconf/user
Binary file not shown.
7 changes: 1 addition & 6 deletions examples/Dockerfile.extend
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ FROM ${BASEIMAGE}:${BASETAG}
USER 0

### update the apt cache and install your new packages
### e.g. vim editor, gimp etc.
### e.g. vim editor
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
vim \
# gimp \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -28,10 +27,6 @@ RUN \
# COPY ./bashrc "${HOME}"/.bashrc
# COPY ./firefox.plus/user.js "${HOME}"/firefox.plus/

### sometimes you need to set the file permisions again
### e.g. if a newly installed app added some files
# RUN "${STARTUPDIR}"/set_user_permissions.sh "${HOME}"

### usually you want to swich back to a non-root user
### alternatively you can do it in a compose file (see 'example.yml')
USER 1000
Expand Down
82 changes: 74 additions & 8 deletions readme-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

- [Utility `builder.sh`](#utility-buildersh)
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Preparation](#preparation)
- [Ensure file attributes after cloning](#ensure-file-attributes-after-cloning)
- [Set environment variables before building](#set-environment-variables-before-building)
- [Ensure `wget` utility](#ensure-wget-utility)
- [Executing complete pipeline](#executing-complete-pipeline)
- [Executing individual pipeline steps](#executing-individual-pipeline-steps)
- [What about the 'cache' helper script](#what-about-the-cache-helper-script)
Expand Down Expand Up @@ -38,22 +41,85 @@ The script creates a complete execution log.

The `<docker-cli-options>` are passed to the Docker CLI commands used internally depending on the usage mode (see below).

## Prerequisites
## Preparation

Before building and publishing the images prepare and source a file containing the necessary environment variables. You can use the provided file `example-secrets.rc` as a template.
### Ensure file attributes after cloning

If you name your file `secrets.rc` and you store it into the folder `docker/hooks/`, then it will sourced automatically by the hook script `env.rc`.
It may be necessary to repair the executable files attributes after cloning the repository (by `git clone`).

Otherwise you can source it in the terminal manually, for example:
You can do that by executing the following commands from the project's root directory:

```shell
source secrets.rc
find . -type f -name "*.sh" -exec chmod +x '{}' \;
chmod +x docker/hooks/*
```

For example, if the files in the folder `docker/hooks` would not be executable, then you would get errors similar to this:

```shell
$ ./builder.sh latest build

==> EXECUTING @2023-03-05_16-42-57: ./builder.sh

./builder.sh: line 84: ./docker/hooks/build: Permission denied
```

### Set environment variables before building

Open a terminal windows and change the current directory to the root of the project (where the license file is).

Make a copy of the secrets example file, modify it and then source it in the terminal:

```shell
### make a copy and then modify it
cp examples/example-secrets.rc secrets.rc

### source the secrets
source ./secrets.rc

### or also

. secrets.rc
. ./secrets.rc
```

**TIP**: If you copy a file named `secrets.rc` into the folder `docker/hooks/`, then it will be automatically sourced by the hook script `env.rc`.

Be aware that the following environment variables are mandatory and must be always set:

- `REPO_OWNER_NAME`
- `BUILDER_REPO`

Ensure that your `secrets.rc` file contains at least the lines similar to these:

```shell
export REPO_OWNER_NAME="accetto"
export BUILDER_REPO="headless-ubuntu-g3"
```

You can use your own names if you wish.

Alternatively you can modify the hook script file env.rc like this:

```shell
### original lines
declare _owner="${REPO_OWNER_NAME:?Need repo owner name}"
DOCKER_REPO="${_owner}/${BUILDER_REPO:?Need builder repo name}"

### modified lines
declare _owner="${REPO_OWNER_NAME:-accetto}"
DOCKER_REPO="${_owner}/${BUILDER_REPO:-headless-ubuntu-g3}"
```

Again, you can use your own names if you wish.

You can also use other ways to set the variables.

### Ensure `wget` utility

If you are on Windows, you can encounter the problem of missing `wget` utility. It is used by refreshing the `g3-cache` and it's available on Linux by default.

On Windows you have generally two choices. You can build your images inside the `WSL` environment or you can download the `wget.exe` application for Windows. Make sure to update also the `PATH` environment variable appropriately.

## Executing complete pipeline

Building the individual images and publishing them to the **Docker Hub**:
Expand Down Expand Up @@ -86,7 +152,7 @@ You can also provide additional parameters for the internally used Docker `build
### docker build --no-cache ...
```

The optional `<docker-cli-options>` are passed only to the `pre_build` hook script, which passes them to the internally used `docker build` command.
The optional `<docker-cli-options>` are passed only to the `pre_build` hook script, which passes them to the internally used `docker build` command. The `cache` hook script, however, doesn't use any Docker CLI commands.

## Executing individual pipeline steps

Expand Down
Loading

0 comments on commit 5dd5f46

Please sign in to comment.