remove implicit user from docker

This commit is contained in:
Evgenii Alekseev 2022-04-01 18:39:24 +03:00
parent e909e4f570
commit 7188cfaf78
2 changed files with 0 additions and 9 deletions

View File

@ -1,7 +1,6 @@
FROM archlinux:base-devel
# image configuration
ENV AHRIMAN_API_USER=""
ENV AHRIMAN_ARCHITECTURE="x86_64"
ENV AHRIMAN_DEBUG=""
ENV AHRIMAN_FORCE_ROOT=""

View File

@ -31,14 +31,6 @@ if [ -n "$AHRIMAN_PORT" ]; then
AHRIMAN_SETUP_ARGS+=("--web-port" "$AHRIMAN_PORT")
fi
ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" repo-setup "${AHRIMAN_SETUP_ARGS[@]}"
# add user for api if set
if [ -n "$AHRIMAN_API_USER" ]; then
# python getpass does not read from stdin
# see thread https://mail.python.org/pipermail/python-dev/2008-February/077235.html
# WARNING with debug mode password will be put to stdout
ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" user-list --error-on-empty "$AHRIMAN_API_USER" > /dev/null ||
ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" user-add --as-service --role write --secure "$AHRIMAN_API_USER" -p "$(openssl rand -base64 20)"
fi
# refresh database
runuser -u build -- yay --noconfirm -Syy &> /dev/null