Arcane
是一个现代化的、基于 Web 的 Docker 管理面板,使用 SvelteKit 构建。它提供了一个简洁直观的界面和强大的管理工具,帮助用户集中管理容器、镜像、数据卷和网络等 Docker 资源。
注意:由于 Arcane 需要挂载 Docker Socket,因此应谨慎评估其在生产环境中的安全性。
本次实践为个人测试环境,操作系统版本为Ubuntu 22.04.1。
hostname | IP地址 | 操作系统版本 | Docker版本 | 部署项目 |
---|---|---|---|---|
jeven01 | 192.168.3.88 | Ubuntu 22.04.1 LTS | 27.1.1 | Arcane |
1.本次实践部署环境为个人测试环境,生产环境请谨慎; 2.在Docker环境下部署的Arcane容器管理平台。
检查Docker服务是否正常运行,确保Docker正常运行。
root@jeven01:~# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2025-07-02 14:16:57 UTC; 21h ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 878 (dockerd)
Tasks: 28
Memory: 1.2G
CPU: 1min 50.356s
CGroup: /system.slice/docker.service
├─ 878 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
检查Docker版本
root@jeven01:~# docker -v
Docker version 27.1.1, build 6312585
检查Docker compose版本,确保2.0以上版本。
root@jeven01:~# docker compose version
Docker Compose version v2.19.1
拉取Arcane容器镜像,如下所示:
docker pull ghcr.io/ofkm/arcane:latest
mkdir -p /data/arcane && cd /data/arcane
在部署目录下,创建docker-compose.yaml文件。
vim docker-compose.yaml
services:
arcane:
image: ghcr.io/ofkm/arcane:latest
container_name: arcane
ports:
- '3000:3000' # Exposes Arcane's web interface on port 3000 of the host.
volumes:
# Mount the Docker socket to allow Arcane to manage Docker.
- /var/run/docker.sock:/var/run/docker.sock
# Mount a volume for Arcane's persistent data (stacks, settings, etc.).
# Replace './arcane-data' with your preferred host path.
- /data/arcane/data:/app/data
# This is where you existing stack files are located if you want to import them, when arcane tries
# to import it it will need to read from the path the compose file is at, hence why onl read only is needed.
- /data/arcane/stacks:/opt/my-docker-stacks:ro # Host path : Container path
environment:
- APP_ENV=production # Sets the application environment to production.
# --- User and Group ID Configuration (Optional but Recommended for Volume Permissions) ---
# These variables control the user and group Arcane runs as inside the container.
# Matching these to your host user's UID/GID can help avoid permission issues
# with the mounted /app/data volume.
- PUID=1000 # User ID for the 'arcane' user inside the container. Defaults to 1000.
- PGID=1000 # Group ID for the 'arcane' group inside the container. Defaults to 1000.
# --- Docker Group ID (Usually Handled Automatically) ---
# - DOCKER_GID=998 # GID for the 'docker' group inside the container.
# The entrypoint script typically auto-detects and sets this based on the
# GID of the mounted /var/run/docker.sock.
# Only set this if you have a specific need or the auto-detection fails.
# --- Session Configuration ---
# Generate a strong secret using: openssl rand -base64 32
- PUBLIC_SESSION_SECRET=MpqbFH7NPbft68HbsjTDZL1mGvtN//FIkFzO1AgOJhE=
# --- Advanced/Debugging (Uncomment if needed) ---
# - PUBLIC_ALLOW_INSECURE_COOKIES=true # Uncomment only for local HTTP testing without SSL/TLS.
# - NODE_ENV=development # For development-specific behaviors (not recommended for production).
restart: unless-stopped # Ensures the container restarts automatically unless manually stopped.
# Optional: Define the volume if you want Docker to manage it explicitly.
# This allows for easier management with `docker volume` commands.
# volumes:
# arcane-data:
# driver: local # Or your preferred volume driver
执行以下命令,创建Arcane容器。
docker compose up -d
检查Arcane容器运行状态,确保Arcane容器正常启动。
root@jeven01:/data/arcane# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7f896f1c5621 ghcr.io/ofkm/arcane:latest "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes 0.0.0.0:3000->3000/tcp, [::]:3000->3000/tcp arcane
检查Arcane容器运行日志,确保Arcane服务正常运行。
docker compose logs
浏览器地址:
http://<个人的服务器IP>:3000
,访问Arcane的初始页。如果无法访问,请确保宿主机的防火墙已关闭或已放行相关端口,对于云服务器还需配置相应的安全组规则。
默认账号密码为arcane/arcane-admin,在登录页登录即可。
第一次登录后会提示修改密码,自定义修改即可。
开启“Container Status Polling”选项后,Arcane 将定期轮询检查容器状态,确保界面显示的运行信息始终保持最新。
点击“Go to Dashboard”选项后,进入Arcane面板首页。
进入容器管理模块后,我们可以查看宿主机上运行的所有容器列表及其统计信息,全面掌握当前容器的运行状态与资源使用情况。
点击容器列表的某个容器,我们可以看到该容器的详细信息。
在镜像管理页面,宿主机上的所有本地镜像列表会被展示,同时显示镜像的总数量及占用的磁盘空间大小,便于进行存储管理与资源优化。
在容器管理页面,可查看本地所有容器网络的列表及相关信息,便于进行网络配置与管理。
Arcane 还提供了诸如数据卷管理和 Compose 项目管理等其他功能,用户可以自行探索体验这些特性,以充分发掘其在 Docker 环境管理中的潜力。
通过本次实战,我们成功部署了 Arcane 容器管理平台,实现了对 Docker 环境的可视化与集中管理。Arcane 凭借其简洁的界面和实用的功能,为容器、镜像、网络及数据卷的管理带来了极大便利。虽然项目仍处于开发阶段,但其轻量高效的特点已展现出良好的使用潜力。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。