This implements custom Alpine-based Smart SPIRE Server and Agent Docker images with self-seeding configuration entrypoints. It also updates the docker-compose configuration to utilize a single host storage volume and a dedicated named socket volume. Setup build pipelines are expanded to compile and push these custom SPIRE images. Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
18 lines
390 B
Bash
Executable File
18 lines
390 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Mitigation for Risk 2: Stale UNIX Socket on Unclean Shutdown
|
|
rm -f /var/run/spire/agent.sock
|
|
|
|
mkdir -p /opt/spire/data/agent
|
|
mkdir -p /var/run/spire
|
|
|
|
if [ ! -f /opt/spire/agent.conf ]; then
|
|
echo "Writing default SPIRE agent.conf..."
|
|
cp /etc/spire/templates/agent.conf /opt/spire/agent.conf
|
|
chmod 644 /opt/spire/agent.conf
|
|
fi
|
|
|
|
exec /usr/local/bin/spire-agent "$@"
|