mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-03-09 23:18:50 +00:00
Docker review
This commit is contained in:
parent
8cbd146565
commit
6c5fc368be
4 changed files with 52 additions and 4 deletions
22
docker/docker-entrypoint.sh
Normal file
22
docker/docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
#set -e
|
||||
|
||||
regenerate_dbus_machine_id() {
|
||||
rm -f /var/lib/dbus/machine-id
|
||||
rm -f /etc/machine-id
|
||||
dbus-uuidgen --ensure
|
||||
}
|
||||
|
||||
CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
|
||||
if [ ! -e $CONTAINER_ALREADY_STARTED ]; then
|
||||
touch $CONTAINER_ALREADY_STARTED
|
||||
regenerate_dbus_machine_id
|
||||
else
|
||||
echo "machine-id already was regenerated"
|
||||
fi
|
||||
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- fastocloud "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue