Use snapshot build for uffd, to have working OIDC

Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
This commit is contained in:
Nis Wechselberg 2024-06-21 16:14:05 +02:00
parent 9809ae6e6f
commit 5aefea179d
Signed by: eNBeWe
GPG key ID: 7B25171F921B9E57
5 changed files with 19 additions and 6 deletions

View file

@ -15,7 +15,23 @@
state: 'directory'
mode: 'u=rwx,g=rx,o=rx'
- name: 'Copy required files for image'
- name: 'Copy static files for image'
become: true
ansible.builtin.copy:
src: 'container/{{ item.file }}'
dest: '{{ uffd_build_tempdir }}/{{ item.file }}'
owner: 'root'
group: 'root'
mode: '{{ item.mode }}'
loop:
- file: 'cccv-archive-key.asc'
mode: 'u=rw,g=r,o=r'
- file: 'entrypoint.sh'
mode: 'u=rwx,g=rx,o=rx'
- file: 'uffd_2.3.1+git20240620T191647-5ccee36c_all.deb'
mode: 'u=rw,g=r,o=r'
- name: 'Copy templates for image'
become: true
ansible.builtin.template:
src: 'container/{{ item.file }}'
@ -26,12 +42,8 @@
loop:
- file: 'cccv-archive.list'
mode: 'u=rw,g=r,o=r'
- file: 'cccv-archive-key.asc'
mode: 'u=rw,g=r,o=r'
- file: 'Containerfile'
mode: 'u=rw,g=r,o=r'
- file: 'entrypoint.sh'
mode: 'u=rwx,g=rx,o=rx'
- name: 'Create uffd container'
become: true

View file

@ -13,10 +13,11 @@ RUN apt-get -qq update && \
# Place the pacakge sources data in the image to download uffd
COPY cccv-archive-key.asc /etc/apt/trusted.gpg.d/
COPY cccv-archive.list /etc/apt/sources.list.d/
COPY uffd_2.3.1+git20240620T191647-5ccee36c_all.deb /tmp/
# Install uffd from (new) package sources
RUN apt-get -qq update && \
apt-get -qq install --no-install-recommends uffd && \
apt-get -qq install --no-install-recommends /tmp/uffd_2.3.1+git20240620T191647-5ccee36c_all.deb && \
# Create a "new" config from the inital config without the preset secret key
cat /etc/uffd/uffd.cfg | grep -v "SECRET_KEY=" > /etc/uffd/uffd.cfg.tmp && \
mv /etc/uffd/uffd.cfg.tmp /etc/uffd/uffd.cfg && \