广告图片

docker.io/spiritlhl/oneclickvirt:latest linux/amd64

docker.io/spiritlhl/oneclickvirt:latest - 国内下载镜像源 浏览次数:14

温馨提示:此镜像为latest tag镜像,本站无法保证此版本为最新镜像

docker.io/spiritlhl/oneclickvirt镜像提供一键部署和管理KVM虚拟化环境的工具,支持快速创建、删除虚拟机,以及网络配置等相关操作,方便用户快速搭建虚拟化环境。

源镜像 docker.io/spiritlhl/oneclickvirt:latest
国内镜像 swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest
镜像ID sha256:07f65f7ef0b4064232fe3825aecfcb75a7bc5f2d5fee643c3a81c4ce8ef1f11b
镜像TAG latest
大小 919.34MB
镜像源 docker.io
项目信息 Docker-Hub主页 🚀项目TAG 🚀
CMD /start.sh
启动入口
工作目录 /app
OS/平台 linux/amd64
浏览量 14 次
贡献者
镜像创建 2026-04-06T07:04:21.976065303Z
同步时间 2026-04-07 13:57
开放端口
80/tcp
目录挂载
/app/storage /var/lib/mysql
环境变量
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TZ=Asia/Shanghai

Docker拉取命令

docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest
docker tag  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest  docker.io/spiritlhl/oneclickvirt:latest

Containerd拉取命令

ctr images pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest
ctr images tag  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest  docker.io/spiritlhl/oneclickvirt:latest

Shell快速替换命令

sed -i 's#spiritlhl/oneclickvirt:latest#swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest#' deployment.yaml

Ansible快速分发-Docker

#ansible k8s -m shell -a 'docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest && docker tag  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest  docker.io/spiritlhl/oneclickvirt:latest'

Ansible快速分发-Containerd

#ansible k8s -m shell -a 'ctr images pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest && ctr images tag  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest  docker.io/spiritlhl/oneclickvirt:latest'

镜像构建历史


# 2026-04-06 15:04:21  0.00B 设置默认要执行的命令
CMD ["/start.sh"]
                        
# 2026-04-06 15:04:21  0.00B 指定检查容器健康状态的命令
HEALTHCHECK &{["CMD-SHELL" "wget --quiet --tries=1 --spider http://localhost/api/v1/health || exit 1"] "30s" "10s" "1m0s" "0s" '\x03'}
                        
# 2026-04-06 15:04:21  0.00B 声明容器运行时监听的端口
EXPOSE [80/tcp]
                        
# 2026-04-06 15:04:21  0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/var/lib/mysql /app/storage]
                        
# 2026-04-06 15:04:21  6.91KB 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c echo '#!/bin/bash' > /start.sh &&     echo 'set -e' >> /start.sh &&     echo 'echo "Starting OneClickVirt..."' >> /start.sh &&     echo '' >> /start.sh &&     echo 'export MYSQL_DATABASE=${MYSQL_DATABASE:-oneclickvirt}' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Update config.yaml with FRONTEND_URL if provided' >> /start.sh &&     echo 'if [ ! -z "$FRONTEND_URL" ]; then' >> /start.sh &&     echo '    echo "Configuring frontend-url: $FRONTEND_URL"' >> /start.sh &&     echo '    sed -i "s|frontend-url:.*|frontend-url: \"$FRONTEND_URL\"|g" /app/config.yaml' >> /start.sh &&     echo '    ' >> /start.sh &&     echo '    # Detect if URL is HTTPS and update nginx config accordingly' >> /start.sh &&     echo '    if echo "$FRONTEND_URL" | grep -q "^https://"; then' >> /start.sh &&     echo '        echo "Detected HTTPS frontend, updating nginx proxy headers..."' >> /start.sh &&     echo '        sed -i "/proxy_set_header X-Forwarded-For/a\            proxy_set_header X-Forwarded-Proto https;" /etc/nginx/nginx.conf' >> /start.sh &&     echo '        sed -i "/proxy_set_header X-Forwarded-For/a\            proxy_set_header X-Forwarded-Ssl on;" /etc/nginx/nginx.conf' >> /start.sh &&     echo '    else' >> /start.sh &&     echo '        echo "Detected HTTP frontend, using default nginx config"' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Detect architecture and set database type' >> /start.sh &&     echo 'ARCH=$(uname -m)' >> /start.sh &&     echo 'if [ "$ARCH" = "x86_64" ]; then' >> /start.sh &&     echo '    DB_TYPE="mysql"' >> /start.sh &&     echo '    DB_DAEMON="mysqld"' >> /start.sh &&     echo 'else' >> /start.sh &&     echo '    DB_TYPE="mariadb"' >> /start.sh &&     echo '    DB_DAEMON="mariadbd"' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo 'echo "Detected architecture: $ARCH, using database: $DB_TYPE"' >> /start.sh &&     echo '' >> /start.sh &&     echo 'chown -R mysql:mysql /var/lib/mysql /var/run/mysqld /var/log/mysql' >> /start.sh &&     echo 'chmod 755 /var/run/mysqld' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Check if database needs initialization' >> /start.sh &&     echo 'INIT_NEEDED=false' >> /start.sh &&     echo '# Create database initialization flag file path (different from business init)' >> /start.sh &&     echo 'DB_INIT_FLAG="/var/lib/mysql/.mysql_initialized"' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Check various conditions for initialization' >> /start.sh &&     echo 'if [ ! -f "$DB_INIT_FLAG" ]; then' >> /start.sh &&     echo '    echo "Database initialization flag not found - database needs initialization"' >> /start.sh &&     echo '    INIT_NEEDED=true' >> /start.sh &&     echo 'elif [ ! -d "/var/lib/mysql/mysql" ]; then' >> /start.sh &&     echo '    echo "Database system directory not found - reinitializing database..."' >> /start.sh &&     echo '    INIT_NEEDED=true' >> /start.sh &&     echo 'elif [ "$(ls -A /var/lib/mysql 2>/dev/null | wc -l)" -eq 0 ]; then' >> /start.sh &&     echo '    echo "Database directory is empty - reinitializing database..."' >> /start.sh &&     echo '    INIT_NEEDED=true' >> /start.sh &&     echo 'else' >> /start.sh &&     echo '    echo "Database already initialized (flag exists and data present), skipping initialization..."' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo '' >> /start.sh &&     echo 'if [ "$INIT_NEEDED" = "true" ]; then' >> /start.sh &&     echo '    # Stop any running database processes' >> /start.sh &&     echo '    pkill -f "$DB_DAEMON" || true' >> /start.sh &&     echo '    sleep 2' >> /start.sh &&     echo '    # Remove old/corrupted data only when needed' >> /start.sh &&     echo '    rm -rf /var/lib/mysql/*' >> /start.sh &&     echo '    # Initialize database based on type' >> /start.sh &&     echo '    if [ "$DB_TYPE" = "mysql" ]; then' >> /start.sh &&     echo '        mysqld --initialize-insecure --user=mysql --datadir=/var/lib/mysql --skip-name-resolve' >> /start.sh &&     echo '    else' >> /start.sh &&     echo '        mariadb-install-db --user=mysql --datadir=/var/lib/mysql --skip-name-resolve' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo '    if [ $? -ne 0 ]; then' >> /start.sh &&     echo '        echo "$DB_TYPE initialization failed"' >> /start.sh &&     echo '        exit 1' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Configure database users and permissions only if initialization was needed' >> /start.sh &&     echo 'if [ "$INIT_NEEDED" = "true" ]; then' >> /start.sh &&     echo '    echo "Configuring $DB_TYPE users and permissions..."' >> /start.sh &&     echo '    pkill -f "$DB_DAEMON" || true' >> /start.sh &&     echo '    sleep 2' >> /start.sh &&     echo '    ' >> /start.sh &&     echo '    # Start temporary database server for configuration' >> /start.sh &&     echo '    echo "Starting temporary $DB_TYPE server for configuration..."' >> /start.sh &&     echo '    $DB_DAEMON --user=mysql --skip-networking --skip-grant-tables --socket=/var/run/mysqld/mysqld.sock --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysql/error.log &' >> /start.sh &&     echo '    mysql_pid=$!' >> /start.sh &&     echo '' >> /start.sh &&     echo 'for i in {1..30}; do' >> /start.sh &&     echo '    if mysql --socket=/var/run/mysqld/mysqld.sock -e "SELECT 1" >/dev/null 2>&1; then' >> /start.sh &&     echo '        echo "$DB_TYPE started successfully"' >> /start.sh &&     echo '        break' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo '    echo "Waiting for $DB_TYPE to start... ($i/30)"' >> /start.sh &&     echo '    if [ $i -eq 30 ]; then' >> /start.sh &&     echo '        echo "$DB_TYPE failed to start"' >> /start.sh &&     echo '        kill $mysql_pid 2>/dev/null || true' >> /start.sh &&     echo '        exit 1' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo '    sleep 1' >> /start.sh &&     echo '    done' >> /start.sh &&     echo '    ' >> /start.sh &&     echo '    echo "Configuring $DB_TYPE users and database..."' >> /start.sh &&     echo '    if [ "$DB_TYPE" = "mysql" ]; then' >> /start.sh &&     echo '        mysql --socket=/var/run/mysqld/mysqld.sock <<SQLEND' >> /start.sh &&     echo 'FLUSH PRIVILEGES;' >> /start.sh &&     echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';" >> /start.sh &&     echo "DROP USER IF EXISTS 'root'@'127.0.0.1';" >> /start.sh &&     echo "DROP USER IF EXISTS 'root'@'%';" >> /start.sh &&     echo "CREATE USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY '';" >> /start.sh &&     echo "CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '';" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION;" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;" >> /start.sh &&     echo "CREATE DATABASE IF NOT EXISTS \\\`\${MYSQL_DATABASE}\\\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" >> /start.sh &&     echo 'FLUSH PRIVILEGES;' >> /start.sh &&     echo 'SQLEND' >> /start.sh &&     echo '    else' >> /start.sh &&     echo '        mysql --socket=/var/run/mysqld/mysqld.sock <<SQLEND' >> /start.sh &&     echo 'FLUSH PRIVILEGES;' >> /start.sh &&     echo "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;" >> /start.sh &&     echo "CREATE USER IF NOT EXISTS 'root'@'127.0.0.1' IDENTIFIED BY '';" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION;" >> /start.sh &&     echo "CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY '';" >> /start.sh &&     echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;" >> /start.sh &&     echo "CREATE DATABASE IF NOT EXISTS \\\`\${MYSQL_DATABASE}\\\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" >> /start.sh &&     echo 'FLUSH PRIVILEGES;' >> /start.sh &&     echo 'SQLEND' >> /start.sh &&     echo '    fi' >> /start.sh &&     echo '' >> /start.sh &&     echo '    kill $mysql_pid' >> /start.sh &&     echo '    wait $mysql_pid 2>/dev/null || true' >> /start.sh &&     echo '    echo "$DB_TYPE configuration completed."' >> /start.sh &&     echo '    # Create database initialization flag to prevent re-initialization' >> /start.sh &&     echo '    echo "$(date): Database initialized successfully with $DB_TYPE" > "$DB_INIT_FLAG"' >> /start.sh &&     echo '    echo "Created database initialization flag at $DB_INIT_FLAG"' >> /start.sh &&     echo 'else' >> /start.sh &&     echo '    echo "Database already configured, skipping user configuration..."' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo '' >> /start.sh &&     echo '# Create supervisor configuration dynamically' >> /start.sh &&     echo 'echo "Creating supervisor configuration for $DB_TYPE..."' >> /start.sh &&     echo 'cat > /etc/supervisor/conf.d/supervisord.conf <<SUPEREND' >> /start.sh &&     echo '[unix_http_server]' >> /start.sh &&     echo 'file=/var/run/supervisor.sock' >> /start.sh &&     echo 'chmod=0700' >> /start.sh &&     echo '' >> /start.sh &&     echo '[supervisorctl]' >> /start.sh &&     echo 'serverurl=unix:///var/run/supervisor.sock' >> /start.sh &&     echo '' >> /start.sh &&     echo '[rpcinterface:supervisor]' >> /start.sh &&     echo 'supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface' >> /start.sh &&     echo '' >> /start.sh &&     echo '[supervisord]' >> /start.sh &&     echo 'nodaemon=true' >> /start.sh &&     echo 'user=root' >> /start.sh &&     echo '' >> /start.sh &&     echo '[program:mysql]' >> /start.sh &&     echo 'SUPEREND' >> /start.sh &&     echo '' >> /start.sh &&     echo 'if [ "$DB_TYPE" = "mysql" ]; then' >> /start.sh &&     echo '    echo "command=/usr/sbin/mysqld --defaults-file=/etc/mysql/conf.d/custom.cnf --lc-messages=en_US" >> /etc/supervisor/conf.d/supervisord.conf' >> /start.sh &&     echo 'else' >> /start.sh &&     echo '    echo "command=/usr/sbin/mariadbd --defaults-file=/etc/mysql/conf.d/custom.cnf" >> /etc/supervisor/conf.d/supervisord.conf' >> /start.sh &&     echo 'fi' >> /start.sh &&     echo '' >> /start.sh &&     echo 'cat >> /etc/supervisor/conf.d/supervisord.conf <<SUPEREND2' >> /start.sh &&     echo 'autostart=true' >> /start.sh &&     echo 'autorestart=true' >> /start.sh &&     echo 'user=mysql' >> /start.sh &&     echo 'priority=1' >> /start.sh &&     echo 'stdout_logfile=/var/log/supervisor/mysql.log' >> /start.sh &&     echo 'stderr_logfile=/var/log/supervisor/mysql_error.log' >> /start.sh &&     echo 'stdout_logfile_maxbytes=10MB' >> /start.sh &&     echo 'stderr_logfile_maxbytes=10MB' >> /start.sh &&     echo 'startsecs=10' >> /start.sh &&     echo 'startretries=3' >> /start.sh &&     echo '' >> /start.sh &&     echo '[program:app]' >> /start.sh &&     echo 'command=/bin/bash -c "sleep 12 && /app/main"' >> /start.sh &&     echo 'directory=/app' >> /start.sh &&     echo 'autostart=true' >> /start.sh &&     echo 'autorestart=true' >> /start.sh &&     echo 'user=root' >> /start.sh &&     echo 'priority=2' >> /start.sh &&     echo 'environment=DB_HOST="127.0.0.1",DB_PORT="3306",DB_USER="root",DB_PASSWORD="",DB_NAME="oneclickvirt"' >> /start.sh &&     echo 'startsecs=1' >> /start.sh &&     echo '' >> /start.sh &&     echo '[program:nginx]' >> /start.sh &&     echo 'command=/usr/sbin/nginx -g "daemon off;"' >> /start.sh &&     echo 'autostart=true' >> /start.sh &&     echo 'autorestart=true' >> /start.sh &&     echo 'user=root' >> /start.sh &&     echo 'priority=3' >> /start.sh &&     echo 'SUPEREND2' >> /start.sh &&     echo '' >> /start.sh &&     echo 'export DB_HOST="127.0.0.1"' >> /start.sh &&     echo 'export DB_PORT="3306"' >> /start.sh &&     echo 'export DB_NAME="$MYSQL_DATABASE"' >> /start.sh &&     echo 'export DB_USER="root"' >> /start.sh &&     echo 'export DB_PASSWORD=""' >> /start.sh &&     echo '' >> /start.sh &&     echo 'echo "Starting services..."' >> /start.sh &&     echo 'exec supervisord -c /etc/supervisor/conf.d/supervisord.conf' >> /start.sh &&     chmod +x /start.sh # buildkit
                        
# 2026-04-06 15:04:21  0.00B 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c mkdir -p /etc/supervisor/conf.d # buildkit
                        
# 2026-04-06 15:04:21  2.03KB 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c echo 'user www-data;' > /etc/nginx/nginx.conf &&     echo 'worker_processes auto;' >> /etc/nginx/nginx.conf &&     echo 'error_log /var/log/nginx/error.log;' >> /etc/nginx/nginx.conf &&     echo 'pid /run/nginx.pid;' >> /etc/nginx/nginx.conf &&     echo 'events { worker_connections 1024; }' >> /etc/nginx/nginx.conf &&     echo 'http {' >> /etc/nginx/nginx.conf &&     echo '    include /etc/nginx/mime.types;' >> /etc/nginx/nginx.conf &&     echo '    default_type application/octet-stream;' >> /etc/nginx/nginx.conf &&     echo '    sendfile on;' >> /etc/nginx/nginx.conf &&     echo '    keepalive_timeout 65;' >> /etc/nginx/nginx.conf &&     echo '    gzip on;' >> /etc/nginx/nginx.conf &&     echo '    ' >> /etc/nginx/nginx.conf &&     echo '    # WebSocket upgrade mapping' >> /etc/nginx/nginx.conf &&     echo '    map $http_upgrade $connection_upgrade {' >> /etc/nginx/nginx.conf &&     echo '        default upgrade;' >> /etc/nginx/nginx.conf &&     echo '        '"''"' close;' >> /etc/nginx/nginx.conf &&     echo '    }' >> /etc/nginx/nginx.conf &&     echo '    ' >> /etc/nginx/nginx.conf &&     echo '    server {' >> /etc/nginx/nginx.conf &&     echo '        listen 80;' >> /etc/nginx/nginx.conf &&     echo '        server_name localhost;' >> /etc/nginx/nginx.conf &&     echo '        root /var/www/html;' >> /etc/nginx/nginx.conf &&     echo '        index index.html;' >> /etc/nginx/nginx.conf &&     echo '        client_max_body_size 10M;' >> /etc/nginx/nginx.conf &&     echo '        ' >> /etc/nginx/nginx.conf &&     echo '        location /api/ {' >> /etc/nginx/nginx.conf &&     echo '            proxy_pass http://127.0.0.1:8888;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header Host $host;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Real-IP $remote_addr;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header REMOTE-HOST $remote_addr;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Forwarded-Port $server_port;' >> /etc/nginx/nginx.conf &&     echo '            ' >> /etc/nginx/nginx.conf &&     echo '            # WebSocket support' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header Upgrade $http_upgrade;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header Connection $connection_upgrade;' >> /etc/nginx/nginx.conf &&     echo '            proxy_http_version 1.1;' >> /etc/nginx/nginx.conf &&     echo '            ' >> /etc/nginx/nginx.conf &&     echo '            # SSL settings' >> /etc/nginx/nginx.conf &&     echo '            proxy_ssl_server_name off;' >> /etc/nginx/nginx.conf &&     echo '            proxy_ssl_name $proxy_host;' >> /etc/nginx/nginx.conf &&     echo '            ' >> /etc/nginx/nginx.conf &&     echo '            # Timeout settings for SSH connections' >> /etc/nginx/nginx.conf &&     echo '            proxy_connect_timeout 60s;' >> /etc/nginx/nginx.conf &&     echo '            proxy_send_timeout 600s;' >> /etc/nginx/nginx.conf &&     echo '            proxy_read_timeout 600s;' >> /etc/nginx/nginx.conf &&     echo '            ' >> /etc/nginx/nginx.conf &&     echo '            # Disable buffering for real-time data' >> /etc/nginx/nginx.conf &&     echo '            proxy_buffering off;' >> /etc/nginx/nginx.conf &&     echo '            add_header X-Cache $upstream_cache_status;' >> /etc/nginx/nginx.conf &&     echo '            add_header Cache-Control no-cache;' >> /etc/nginx/nginx.conf &&     echo '        }' >> /etc/nginx/nginx.conf &&     echo '        ' >> /etc/nginx/nginx.conf &&     echo '        location /swagger/ {' >> /etc/nginx/nginx.conf &&     echo '            proxy_pass http://127.0.0.1:8888;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header Host $host;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Real-IP $remote_addr;' >> /etc/nginx/nginx.conf &&     echo '            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> /etc/nginx/nginx.conf &&     echo '        }' >> /etc/nginx/nginx.conf &&     echo '        ' >> /etc/nginx/nginx.conf &&     echo '        location / {' >> /etc/nginx/nginx.conf &&     echo '            try_files $uri $uri/ /index.html;' >> /etc/nginx/nginx.conf &&     echo '        }' >> /etc/nginx/nginx.conf &&     echo '    }' >> /etc/nginx/nginx.conf &&     echo '}' >> /etc/nginx/nginx.conf # buildkit
                        
# 2026-04-06 15:04:21  399.00B 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c if [ "$TARGETARCH" = "amd64" ]; then         echo '[mysqld]' > /etc/mysql/conf.d/custom.cnf &&         echo 'datadir=/var/lib/mysql' >> /etc/mysql/conf.d/custom.cnf &&         echo 'socket=/var/run/mysqld/mysqld.sock' >> /etc/mysql/conf.d/custom.cnf &&         echo 'user=mysql' >> /etc/mysql/conf.d/custom.cnf &&         echo 'pid-file=/var/run/mysqld/mysqld.pid' >> /etc/mysql/conf.d/custom.cnf &&         echo 'bind-address=0.0.0.0' >> /etc/mysql/conf.d/custom.cnf &&         echo 'port=3306' >> /etc/mysql/conf.d/custom.cnf &&         echo 'character-set-server=utf8mb4' >> /etc/mysql/conf.d/custom.cnf &&         echo 'collation-server=utf8mb4_unicode_ci' >> /etc/mysql/conf.d/custom.cnf &&         echo 'authentication_policy=mysql_native_password' >> /etc/mysql/conf.d/custom.cnf &&         echo 'max_connections=200' >> /etc/mysql/conf.d/custom.cnf &&         echo 'skip-name-resolve' >> /etc/mysql/conf.d/custom.cnf &&         echo 'secure-file-priv=""' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_buffer_pool_size=256M' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_redo_log_capacity=67108864' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_force_recovery=0' >> /etc/mysql/conf.d/custom.cnf;     else         echo '[mysqld]' > /etc/mysql/conf.d/custom.cnf &&         echo 'datadir=/var/lib/mysql' >> /etc/mysql/conf.d/custom.cnf &&         echo 'socket=/var/run/mysqld/mysqld.sock' >> /etc/mysql/conf.d/custom.cnf &&         echo 'user=mysql' >> /etc/mysql/conf.d/custom.cnf &&         echo 'pid-file=/var/run/mysqld/mysqld.pid' >> /etc/mysql/conf.d/custom.cnf &&         echo 'bind-address=0.0.0.0' >> /etc/mysql/conf.d/custom.cnf &&         echo 'port=3306' >> /etc/mysql/conf.d/custom.cnf &&         echo 'character-set-server=utf8mb4' >> /etc/mysql/conf.d/custom.cnf &&         echo 'collation-server=utf8mb4_unicode_ci' >> /etc/mysql/conf.d/custom.cnf &&         echo 'max_connections=200' >> /etc/mysql/conf.d/custom.cnf &&         echo 'skip-name-resolve' >> /etc/mysql/conf.d/custom.cnf &&         echo 'secure-file-priv=""' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_buffer_pool_size=256M' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_log_file_size=64M' >> /etc/mysql/conf.d/custom.cnf &&         echo 'innodb_force_recovery=0' >> /etc/mysql/conf.d/custom.cnf;     fi # buildkit
                        
# 2026-04-06 15:04:21  6.73MB 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c mkdir -p /var/run/mysqld &&     chown -R mysql:mysql /var/lib/mysql /var/log/mysql /var/run/mysqld &&     chown -R www-data:www-data /var/www/html &&     chmod -R 755 /var/www/html &&     chmod 755 /app/main &&     chmod 666 /app/config.yaml &&     chmod 750 /app/storage &&     chmod -R 750 /app/storage/* # buildkit
                        
# 2026-04-06 15:04:21  6.73MB 复制新文件或目录到容器中
COPY /app/web/dist /var/www/html # buildkit
                        
# 2026-04-06 15:04:21  3.06KB 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c if [ ! -f /app/config.yaml ]; then mv /app/config.yaml.default /app/config.yaml; else rm /app/config.yaml.default; fi # buildkit
                        
# 2026-04-06 15:04:21  3.06KB 复制新文件或目录到容器中
COPY /app/server/config.yaml ./config.yaml.default # buildkit
                        
# 2026-04-06 15:04:21  46.98MB 复制新文件或目录到容器中
COPY /app/server/main ./main # buildkit
                        
# 2026-04-02 11:37:17  0.00B 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c mkdir -p /var/lib/mysql /var/log/mysql /var/run/mysqld /var/log/supervisor     && mkdir -p /app/storage/{cache,certs,configs,exports,logs,temp,uploads}     && mkdir -p /etc/mysql/conf.d # buildkit
                        
# 2026-04-02 11:37:17  0.00B 设置工作目录为/app
WORKDIR /app
                        
# 2026-04-02 11:37:17  0.00B 设置环境变量 TZ
ENV TZ=Asia/Shanghai
                        
# 2026-04-02 11:37:17  784.06MB 执行命令并创建新的镜像层
RUN |1 TARGETARCH=amd64 /bin/sh -c apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -y         gnupg2 wget lsb-release procps nginx supervisor ca-certificates &&     if [ "$TARGETARCH" = "amd64" ]; then         echo "Installing MySQL for AMD64..." &&         gpg --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C &&         gpg --export B7B3B788A8D3785C > /usr/share/keyrings/mysql.gpg &&         echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list &&         apt-get update &&         DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server mysql-client;     else         echo "Installing MariaDB for ARM64..." &&         DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client;     fi &&     apt-get clean # buildkit
                        
# 2026-04-02 11:37:17  0.00B 定义构建参数
ARG TARGETARCH=amd64
                        
# 2026-03-16 08:00:00  74.83MB 
# debian.sh --arch 'amd64' out/ 'bookworm' '@1773619200'
                        
                    

镜像信息

{
    "Id": "sha256:07f65f7ef0b4064232fe3825aecfcb75a7bc5f2d5fee643c3a81c4ce8ef1f11b",
    "RepoTags": [
        "spiritlhl/oneclickvirt:latest",
        "swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt:latest"
    ],
    "RepoDigests": [
        "spiritlhl/oneclickvirt@sha256:5c05b2d724720b3b31a6e62d536df7a53a5e08630a886db10c7e4a0460cdb359",
        "swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/spiritlhl/oneclickvirt@sha256:673fd5f49852583e717ef780193130b11408fb63b19de1246288e7fdf1d42028"
    ],
    "Parent": "",
    "Comment": "buildkit.dockerfile.v0",
    "Created": "2026-04-06T07:04:21.976065303Z",
    "Container": "",
    "ContainerConfig": null,
    "DockerVersion": "",
    "Author": "",
    "Config": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "80/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "TZ=Asia/Shanghai"
        ],
        "Cmd": [
            "/start.sh"
        ],
        "Healthcheck": {
            "Test": [
                "CMD-SHELL",
                "wget --quiet --tries=1 --spider http://localhost/api/v1/health || exit 1"
            ],
            "Interval": 30000000000,
            "Timeout": 10000000000,
            "StartPeriod": 60000000000,
            "Retries": 3
        },
        "ArgsEscaped": true,
        "Image": "",
        "Volumes": {
            "/app/storage": {},
            "/var/lib/mysql": {}
        },
        "WorkingDir": "/app",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": null
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Size": 919344375,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/6bd19dd212a2d0791b7e843605b3595686b495a76c68e969cd94172a18b410ff/diff:/var/lib/docker/overlay2/a135389c0e161131f8019dbdf196353569b64e8b7c4c702b20db1b35eff535b2/diff:/var/lib/docker/overlay2/ec1402fa857cbf8e3f681a5a142c99d7792bd09703c4600a9876b5b578db91dd/diff:/var/lib/docker/overlay2/ab20b25614efb340c323ef8f508090b0d2956ff3f1c22cd49d7429e19fee5e34/diff:/var/lib/docker/overlay2/3a2216d11248e1438d5febf430e8fa0e3d957ae5dfb0bf6bb38791c30623cf05/diff:/var/lib/docker/overlay2/d988d5c7da281be16b2d4cdd37920153b51103fd1e95afa5e4849ea1260c45e6/diff:/var/lib/docker/overlay2/e103dd781bfe4692e0792857cbfb4bfe7fcb0d9ef0ebc0cedc647c386821b3b4/diff:/var/lib/docker/overlay2/6dd1a2c184ecf4d0b0c241982fffe88929f3d9e1a862787c30420275557c22e5/diff:/var/lib/docker/overlay2/b041751f3aa95cedf86bb34addc529ee65805bae8350f4c16e8fbc4e96f7878d/diff:/var/lib/docker/overlay2/89bf7f36992d460cddf2c6a1efc68a6a5e9ed3b1fa967bc06e380b881707a239/diff:/var/lib/docker/overlay2/3a09ae04448970a30e8367256943cd29e35fdd573cd00c0a56cfd0b3295b04c4/diff:/var/lib/docker/overlay2/b80d11e2217e6b9ec5b545e8e3213cf65647095e32406f3068905c03b1e1a23a/diff",
            "MergedDir": "/var/lib/docker/overlay2/559c426d753127a600d2834e8cd5a61dbf4ea0e92a70651ff8bd993817562f0f/merged",
            "UpperDir": "/var/lib/docker/overlay2/559c426d753127a600d2834e8cd5a61dbf4ea0e92a70651ff8bd993817562f0f/diff",
            "WorkDir": "/var/lib/docker/overlay2/559c426d753127a600d2834e8cd5a61dbf4ea0e92a70651ff8bd993817562f0f/work"
        },
        "Name": "overlay2"
    },
    "RootFS": {
        "Type": "layers",
        "Layers": [
            "sha256:6143ee9e3de07e6ca35edaf392cf93dea566a5bcd0d3696607ae6c324193d099",
            "sha256:84ffb72fe0eaca35a009fdbf4e193b9e7bcdb901593a7d9bfba8e55d26ee7f76",
            "sha256:eafff7ca14f60c7b95cead0637bfec36daa2d4577f386af721d9b7b107c43d57",
            "sha256:462292b75863bc4eb478c0de43a3f0d1b10c00839b15118bfb433c97ec76bf3f",
            "sha256:d47a7312b5205fc12655d633dd5b3fdee1e96d822f0489dbb0129fef63b8a60d",
            "sha256:39a978bc608ed7e069e4323311a8117fd5193379a5e66b39d2496a795c59a646",
            "sha256:6b6c52ee4821acce70beeb8840c11e1bb9341082d7275f562ddd7b63d15cafba",
            "sha256:925daa848a7a130690d1c34dd54305f8717d0ab60f8684d87ba4e3d15c27b0b5",
            "sha256:a7052cb2407b1779805227c268e3fa9cac85478dd3947d3b262ac898666194c0",
            "sha256:b95311e9d4a84cce5ca6032e22fce8207b030d5c394a8d9d5d5e936c5f70af79",
            "sha256:d4a8b7a00eafbabf26d0cc6202744160f53aae3f81af71dfcdd789b8845049a2",
            "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
            "sha256:58059d08599e641c841ade40419961e3567a23f7ce37db7a32841f00d1e9d827"
        ]
    },
    "Metadata": {
        "LastTagTime": "2026-04-07T13:57:12.5511399+08:00"
    }
}

更多版本

docker.io/spiritlhl/oneclickvirt:latest

linux/amd64 docker.io919.34MB2026-04-07 13:57
13