docker: better handling of customer repo URL
Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: I4f750a8679e193ede399ae51d9b8b8cff5502f4d
This commit is contained in:
parent
4e05ca3012
commit
b4e6fe82c7
4 changed files with 9 additions and 12 deletions
|
@ -19,13 +19,17 @@ Examples:
|
|||
|
||||
cd from-packages
|
||||
# Get your secret URL key from https://support.collaboraoffice.com/ (Collabora Partners/Customers)
|
||||
docker build --no-cache --build-arg type=cool --build-arg secret_key=<....> -t mydomain/cool -f Ubuntu .
|
||||
# e.g. the secret key is Example-413539ece39485afc35b4a469adfde0a279d2fd2
|
||||
echo Example-413539ece39485afc35b4a469adfde0a279d2fd2 > secret_key
|
||||
docker build --no-cache --secret id=secret_key,src=secret_key --build-arg type=cool -t mydomain/cool -f Ubuntu .
|
||||
|
||||
3. Build Collabora Online 22.05 based on RHEL8
|
||||
|
||||
cd from-packages
|
||||
# Get your secret URL key from https://support.collaboraoffice.com/ (Collabora Partners/Customers)
|
||||
docker build --no-cache --build-arg type=cool --build-arg secret_key=<....> -t mydomain/cool -f RHEL8 .
|
||||
# e.g. the secret key is Example-413539ece39485afc35b4a469adfde0a279d2fd2
|
||||
echo Example-413539ece39485afc35b4a469adfde0a279d2fd2 > secret_key
|
||||
docker build --no-cache --secret id=secret_key,src=secret_key --build-arg type=cool -t mydomain/cool -f RHEL8 .
|
||||
|
||||
4. Build Collabora Online 22.05 license key enabled version based on Ubuntu 18.04 LTS
|
||||
|
||||
|
|
|
@ -19,16 +19,12 @@ ARG version
|
|||
# Optional. The default is 'code'.
|
||||
ARG type
|
||||
|
||||
# secret_key is the URL hash from https://support.collaboraoffice.com
|
||||
# Mandatory, when you build 'cool', otherwise not needed.
|
||||
ARG secret_key
|
||||
|
||||
# Environment variables
|
||||
ENV LC_CTYPE C.UTF-8
|
||||
|
||||
# Setup scripts for Collabora Online
|
||||
ADD /scripts/install-collabora-online-rhel8.sh /
|
||||
RUN bash install-collabora-online-rhel8.sh
|
||||
RUN --mount=type=secret,id=secret_key bash install-collabora-online-rhel8.sh
|
||||
RUN rm -rf /install-collabora-online-rhel8.sh
|
||||
|
||||
# Start script for Collabora Online
|
||||
|
|
|
@ -19,16 +19,12 @@ ARG version
|
|||
# Optional. The default is 'code'.
|
||||
ARG type
|
||||
|
||||
# secret_key is the URL hash from https://support.collaboraoffice.com
|
||||
# Mandatory, when you build 'cool', otherwise not needed.
|
||||
ARG secret_key
|
||||
|
||||
# Environment variables
|
||||
ENV LC_CTYPE C.UTF-8
|
||||
|
||||
# Setup scripts for Collabora Online
|
||||
ADD /scripts/install-collabora-online-ubuntu.sh /
|
||||
RUN bash install-collabora-online-ubuntu.sh
|
||||
RUN --mount=type=secret,id=secret_key bash install-collabora-online-ubuntu.sh
|
||||
RUN rm -rf /install-collabora-online-ubuntu.sh
|
||||
|
||||
# Start script for Collabora Online
|
||||
|
|
|
@ -33,6 +33,7 @@ if [ $(uname -i) == "aarch64" ]; then
|
|||
fi
|
||||
|
||||
# Add Collabora repos
|
||||
secret_key=$(cat /run/secrets/secret_key)
|
||||
if [ "$type" == "cool" ] && [ -n ${secret_key+set} ]; then
|
||||
echo "Based on the provided build arguments Collabora Online from customer repo will be used."
|
||||
echo "deb [signed-by=/usr/share/keyrings/collaboraonline-release-keyring.gpg] https://collaboraoffice.com/${repo:-repos}/CollaboraOnline/${version:-22.05}/customer-ubuntu1804-${secret_key} /" >> /etc/apt/sources.list.d/collabora.list
|
||||
|
|
Loading…
Reference in a new issue