mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-13 23:45:17 +00:00
chore: updated dockerSafeExec() logs
This commit is contained in:
@@ -148,13 +148,13 @@ export const getContainerByName = (name: string): Promise<ContainerInfo> => {
|
|||||||
/** Docker commands passed through this method are held during Docker's build or pull process. (https://github.com/dokploy/dokploy/pull/3064) */
|
/** Docker commands passed through this method are held during Docker's build or pull process. (https://github.com/dokploy/dokploy/pull/3064) */
|
||||||
export const dockerSafeExec = (exec: string) => `CHECK_INTERVAL=10
|
export const dockerSafeExec = (exec: string) => `CHECK_INTERVAL=10
|
||||||
|
|
||||||
echo "Starting Docker cleanup..."
|
echo "Preparing for execution..."
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
PROCESSES=$(ps aux | grep -E "docker build|docker pull" | grep -v grep)
|
PROCESSES=$(ps aux | grep -E "docker build|docker pull" | grep -v grep)
|
||||||
|
|
||||||
if [ -z "$PROCESSES" ]; then
|
if [ -z "$PROCESSES" ]; then
|
||||||
echo "Docker is idle. Starting cleanup..."
|
echo "Docker is idle. Starting execution..."
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo "Docker is busy. Will check again in $CHECK_INTERVAL seconds..."
|
echo "Docker is busy. Will check again in $CHECK_INTERVAL seconds..."
|
||||||
@@ -164,7 +164,7 @@ done
|
|||||||
|
|
||||||
${exec}
|
${exec}
|
||||||
|
|
||||||
echo "Docker cleanup completed."`;
|
echo "Execution completed."`;
|
||||||
|
|
||||||
export const cleanUpUnusedImages = async (serverId?: string) => {
|
export const cleanUpUnusedImages = async (serverId?: string) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user