mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-21 00:51:06 -05:00
Hemna
f0034fc517
This patch updates the main Dockerfile container build to use the python:3.8-slim base image and installs aprsd from pypi. This also results in a much smaller image. Also added support for multiarchitecture builds so the same Dockerfile builds for raspberry pi and linux/amd64
24 lines
610 B
Bash
Executable File
24 lines
610 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -x
|
|
|
|
if [ ! -z "${APRSD_PLUGINS}" ]; then
|
|
OLDIFS=$IFS
|
|
IFS=','
|
|
echo "Installing pypi plugins '$APRSD_PLUGINS'";
|
|
for plugin in ${APRSD_PLUGINS}; do
|
|
IFS=$OLDIFS
|
|
# call your procedure/other scripts here below
|
|
echo "Installing '$plugin'"
|
|
pip3 install $plugin
|
|
done
|
|
fi
|
|
|
|
# check to see if there is a config file
|
|
APRSD_CONFIG="/config/aprsd.yml"
|
|
if [ ! -e "$APRSD_CONFIG" ]; then
|
|
echo "'$APRSD_CONFIG' File does not exist. Creating."
|
|
aprsd sample-config > $APRSD_CONFIG
|
|
fi
|
|
|
|
/usr/local/bin/aprsd server -c $APRSD_CONFIG --loglevel DEBUG
|