Skip to content

Commit 393a3d3

Browse files
committed
[signer] Allow for use as a pcscd service container
GitHub Actions does not (yet) allow for specifying a command for a service container. Work around this by allowing pcscd to be invoked by passing a non-empty environment variable "RUN_PCSCD". Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
1 parent 7a4a04d commit 393a3d3

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

signer/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ 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+
2228
FROM signer AS check-signer
2329

2430
RUN dnf install -y \

signer/entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
# GitHub Actions does not (yet) allow for specifying a command for a
4+
# service container. Work around this by allowing pcscd to be invoked
5+
# by passing a non-empty environment variable "RUN_PCSCD".
6+
#
7+
if [ -n "${RUN_PCSCD}" ] ; then
8+
rm -f /run/pcscd/pcscd.comm
9+
exec /usr/bin/pcscd --foreground --disable-polkit
10+
fi
11+
12+
exec "$@"

0 commit comments

Comments
 (0)