Skip to content

Commit 0214d25

Browse files
committed
[signer] Build separate pcscd service container image
Reduce the verbosity of the consuming GitHub Actions workflow by encapsulating the healthcheck information into the pcscd service container definition. Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
1 parent 393a3d3 commit 0214d25

3 files changed

Lines changed: 27 additions & 18 deletions

File tree

.github/workflows/signer.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
env:
1919
pkgname: ipxe-signer
20+
pcscdname: ipxe-signer-pcscd
2021
reponame: ghcr.io/${{ github.repository_owner }}
2122
label: ${{ github.ref_name == 'master' && 'latest' || github.ref_name }}
2223
steps:
@@ -42,6 +43,15 @@ jobs:
4243
tags: |
4344
${{ env.reponame }}/${{ env.pkgname }}:draft-${{ github.sha }}
4445
46+
- name: Build (pcscd)
47+
uses: docker/build-push-action@v6
48+
with:
49+
context: signer
50+
target: pcscd
51+
push: true
52+
tags: |
53+
${{ env.reponame }}/${{ env.pcscdname }}:draft-${{ github.sha }}
54+
4555
- name: Build (checker)
4656
uses: docker/build-push-action@v6
4757
with:
@@ -61,3 +71,9 @@ jobs:
6171
docker buildx imagetools create \
6272
--tag ${{ env.reponame }}/${{ env.pkgname }}:${{ env.label }} \
6373
${{ env.reponame }}/${{ env.pkgname }}:draft-${{ github.sha }}
74+
75+
- name: Publish (pcscd)
76+
run: |
77+
docker buildx imagetools create \
78+
--tag ${{ env.reponame }}/${{ env.pcscdname }}:${{ env.label }} \
79+
${{ env.reponame }}/${{ env.pcscdname }}:draft-${{ github.sha }}

signer/Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ RUN echo "install_weak_deps=False" >> /etc/dnf/dnf.conf \
1919
syslinux \
2020
&& dnf clean all -y
2121

22-
COPY entrypoint.sh /bin/entrypoint.sh
23-
24-
ENTRYPOINT [ "/bin/entrypoint.sh" ]
25-
26-
CMD [ "/bin/sh" ]
27-
2822
FROM signer AS check-signer
2923

3024
RUN dnf install -y \
@@ -41,6 +35,17 @@ ADD https://github.com/ipxe/ipxe.git /ipxe
4135
CMD /ipxe/src/util/genfsimg -o dummy.iso dummy.lkrn dummy.efi && \
4236
iso-info dummy.iso
4337

38+
#
39+
# Service container for pcscd
40+
#
41+
42+
FROM signer AS pcscd
43+
44+
CMD rm -f /run/pcscd/pcscd.comm ; \
45+
/usr/bin/pcscd --foreground --disable-polkit
46+
47+
HEALTHCHECK --interval=3s --timeout=5s CMD pcscd --hotplug
48+
4449
#
4550
# Specify the default target
4651
#

signer/entrypoint.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)