轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
canvas-dev-only

lthub/canvas-dev-only

lthub

Instructure Canvas LMS, built for local development use only. Not a single image service.

下载次数: 0状态:社区镜像维护者:lthub仓库类型:镜像最近更新:4 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
使用轩辕镜像,把时间还给真正重要的事。
点击查看

Expected Credentials

  • Admin Username: ***

  • Admin Password: password

  • Admin API Key - depends on which image you use

    • 2025-04-23: Tz4aawtEPDNLTtHXNAPkW4N9my8Qw2faWyueTT8fPR88NvcfQT3TMD8vPAm4AUQn
    • 2025-06-18 and above: YPhZLv6wyABWUeEKMz99VGQvwNmETtZ8eerYHf4Afzv6uR8m4kAWnvD2wBCKkAF7
  • Postgres Username: postgres

  • Postgres Password: sekret

  • Postgres Database Name: canvas_development

Docker Compose

NOTE: For ARM users (e.g.: Apple Silicon Macs), use the arm variant of the image tags, e.g.: lthub/canvas-dev-only:release.2026-01-28.618.arm

This example expects you to copy the database dump from within the Canvas image in /usr/src/app/dbinit/ to a local directory docker/dev/canvas/. The database dump sql files are executed when postgres starts up with an e***y database to initialize Canvas. Example command to copy the database base to host:

bash
docker create --name tmpCanvas lthub/canvas-dev-only:release.2026-01-28.618
mkdir -p docker/dev/canvas
docker cp tmpCanvas:/usr/src/app/dbinit/. docker/dev/canvas/
docker rm -f tmpCanvas

Example docker-compose.yml file below for running this dev instance.

yaml
# Only for dev use
services:
  canvas.postgres:
    image: pgvector/pgvector:pg14
    volumes:
      - canvasPostgresData:/var/lib/postgresql/data
      - ./docker/dev/canvas:/docker-entrypoint-initdb.d
    healthcheck: # no built-in healthcheck in the image, so we specify one
      test: ["CMD-SHELL", "pg_isready -U postgres -h localhost -p 5432"]
      start_period: 2m # ignore failures in the initial 2 minutes
    environment:
      POSTGRES_PASSWORD: sekret

  canvas: &CANVAS
    image: lthub/canvas-dev-only:release.2026-01-28.618
    ports:
      - 9100:80
    depends_on:
      canvas.postgres:
        # if starting from scratch, postgres db needs to populated, which can
        # take some time, so we need to wait until postgres is healthy
        condition: service_healthy
      canvas.redis:
        condition: service_started
    volumes:
      - api_docs:/usr/src/app/public/doc/api
      - brandable_css_brands:/usr/src/app/app/stylesheets/brandable_css_brands
      - bundler:/home/docker/.bundle/
      - canvas-docker-gems:/home/docker/.gem/
      - js-utils_es:/usr/src/app/packages/js-utils/es
      - js-utils_lib:/usr/src/app/packages/js-utils/lib
      - js-utils_node_modules:/usr/src/app/packages/js-utils/node_modules
      - locales:/usr/src/app/config/locales/generated
      - log:/usr/src/app/log
      - node_modules:/usr/src/app/node_modules
      - pacts:/usr/src/app/pacts
      - public_dist:/usr/src/app/public/dist
      - reports:/usr/src/app/reports
      - styleguide:/usr/src/app/app/views/info
      - tmp:/usr/src/app/tmp
      - translations:/usr/src/app/public/javascripts/translations
      - yardoc:/usr/src/app/.yardoc
      - yarn-cache:/home/docker/.cache/yarn
    environment:
      VIRTUAL_HOST: .canvas.docker
      CANVAS_DATABASE_HOST: canvas.postgres
      CANVAS_REDIS_HOST: canvas.redis
      HTTPS_METHOD: noredirect
      POSTGRES_PASSWORD: sekret
      ENCRYPTION_KEY: facdd3a131ddd8988b14f6e4e01039c93cfa0160

  canvas.job:
    <<: *CANVAS
    command: bundle exec script/delayed_job run
    attach: false # job is very noisy, so we hide logs for it by default
    ports: []

  canvas.redis:
    image: redis:alpine

  # Inside the docker network, canvas is served on port 80. When we expose
  # canvas to external traffic however, we serve canvas on port 9100. This
  # mismatch means that when app talks directly to canvas using the external
  # url (http://localhost:9100), it doesn't work because app is also inside
  # the docker network and needs to use port 80. To workaround this, socat will
  # redirect internal docker traffic to port 9100 to canvas port 80.
  canvas.socat:
    image: alpine/socat:1.8.0.3
    depends_on:
      - canvas
    command: "TCP-LISTEN:9100,fork,reuseaddr TCP:canvas:80"

volumes:
  canvasPostgresData: {}
  api_docs: {}
  brandable_css_brands: {}
  bundler: {}
  canvas-docker-gems: {}
  i18nliner_node_modules: {}
  js-utils_es: {}
  js-utils_lib: {}
  js-utils_node_modules: {}
  k5uploader_es: {}
  k5uploader_lib: {}
  k5uploader_node_modules: {}
  locales: {}
  log: {}
  node_modules: {}
  pg_data: {}
  pacts: {}
  public_dist: {}
  reports: {}
  styleguide: {}
  tmp: {}
  translations: {}
  yardoc: {}
  yarn-cache: {}

Canvas Image

To build a new version, first checkout the https://github.com/instructure/canvas-lms repo and switch to a release tag. The release tags are dated, avoid releases that have not yet been deployed and be cautious of the current deployed release. Future release tags might not build properly, and even the currently deployed tags might have bugs that's being patched. For example, if we're currently on 2025-07-02 release tag, both the current 2025-07-02 tags and the future 2025-07-16 tags might have issues, and Instructure is probably still adding commits to them. It might be safer to use the release before 2025-07-02, which is 2025-06-18.

Once you're on a release tag, run the Canvas setup script manually ./script/docker_dev_setup.sh to get a working running Canvas. The Canvas setup script unfortunately does not use Bundler's deployment build option, so it might try to modify the lockfile and run into a permission issue. This is one factor in why it can be difficult to reproduce Canvas builds. See Troubleshooting section for more details.

  • You can skip dory as we're not using it
  • For first run, answer yes to 'Copying Canvas docker configuration'. You can answer no for any subsequent runs, including skipping resetting the .env file.

Once you get docker_dev_setup.sh to complete successfully, then you can build a new image using Canvas' own Dockerfile.production, with the following modifications:

  • Editing config/redis.yml to replace redis://redis with redis://<%= ENV.fetch('CANVAS_REDIS_HOST', 'redis') %> so the redis host can be configured via env vars.

  • Create config/environments/development-local.rb with the content below. This file disables Canvas not allowing requests to local IPs as a security measure. Without it, local development has issues (e.g.: course > people ajax loading, grab***g JWKS from a locally running app):

    Rails.application.configure do
      # remove blocking local ips in dev (in particular 10.0.0.1/8,
      # 192.168.0.0/16), this breaks ajax loading (e.g.: course > people) and makes
      # Canvas unable to get JWKS from other docker compose services
      CanvasHttp.blocked_ip_ranges = []
    end
    
  • Editing config/database.yml to replace <%= ENV.fetch('POSTGRES_PASSWORD') %> with <%= ENV.fetch('POSTGRES_PASSWORD', 'postgres') %>, this fix a build issue that complains POSTGRES_PASSWORD is null.

We want to use the prod Dockerfile so we have the compiled static dependencies and don't need to run a separate webpack container for them.

To build the image, docker-compose.override.yml was edited to add an 'app' section for building the image as follows:

app:
  build:
    context: .
    dockerfile: Dockerfile.production
  image: lthub/canvas-dev-only:release.2025-04-23.348
  environment:
    VIRTUAL_HOST: .canvas.docker
    HTTPS_METHOD: noredirect
    POSTGRES_PASSWORD: sekret
    ENCRYPTION_KEY: facdd3a131ddd8988b14f6e4e01039c93cfa0160

The image can then be build using docker compose build app and pushed to Dockerhub using docker compose push app. Remember to update the image tag as necessary.

Database dump was taken inside the Postgres container and copied to dbinit/ inside the Canvas image. You will need to mount these sql files to your own Canvas's Postgres init scripts directory in order to properly initialize the Canvas database. The database dump commands:

pg_dumpall -U postgres -W --globals-only --file=01_globals.sql
pg_dump -U postgres -W --create canvas_development > 02_canvas_development.sql
pg_dump -U postgres -W --create canvas_test > 03_canvas_test.sql

Edit the 01_globals.sql file to remove the creation of the role postgres as that'll be automatically created by the postgres container.

We won't use the canvas_test database, it's included to make migration to newer Canvas versions easier. Instructure's docker_canvas_setup.sh script's db migration step expects both canvas_development and canvas_test databases to exist.

The Canvas postgres service in your app's docker-compose.yml should look something like this, we need the pgvector plugin, so we're using their image:

canvas.postgres:
  image: pgvector/pgvector:pg14
  volumes:
    - canvasPostgresData:/var/lib/postgresql/data
    - ./path/to/canvas/sql:/docker-entrypoint-initdb.d
  environment:
    POSTGRES_PASSWORD: sekret

Additional Changes

  • Populated permissions & roles to match our prod Canvas.
  • Change default timezone for root account, Site Admin, *** to Pacific time
  • admin@example.com has Integration ID set (so apps requiring PUID don't complain)
  • Stock LTI keys are too old, and thus too short, to satisfy RSA256 requirements. If this is a completely new build, you need to force Canvas to rotate them out before taking new DB dumps. You can check the current LTI keys at the JWKS url: http://localhost:9100/api/lti/security/jwks
    • There is a monthly cron job (1st of every month) that gets executed to rotate the LTI keys, it is configured in: config/initializers/periodic_jobs.rb. The job is Lti::KeyStorage.rotate_keys. We can find the job this creates in the delayed_jobs table:

      SELECT * FROM "delayed_jobs" where handler like '%rotate_keys%';
      

      We can change the 'run_at' field so it'll run sooner. Not sure if needed, but best to restart Canvas after changing the db in case that's needed for the change to be picked up. Warning: The rotate keys job enforces 1 hour of separation between rotates, so it'll do nothing if you've already rotated keys once in the past hour. There are 3 old keys to rotate out, so this requires at least 3 hours.

      Template:

      UPDATE "delayed_jobs" SET run_at = '<INSERT DATETIME>' WHERE id=<INSERT ID>;
      

      Example:

      UPDATE "delayed_jobs" SET run_at = '2025-11-17 08:58:00' WHERE id=2793;
      

Troubleshooting

File Permission Issue While Building Image

You might get a permission error about writing to the Gemfile.lock or similar. Instructure uses a user/group with a uid/gid of 9999 to run all their containers. So one way we can sidestep the permission issue is to set all Canvas files to be owned by this Instructure docker user/group. In my case, I created a instructure-docker group with a gid of 9999 and set the entire Canvas source directory to be owned by that group.

Alternatively, edit scripts/docker_dev_setup.sh and comment out the CANVAS_SKIP_DOCKER_USERMOD declaration:

#CANVAS_SKIP_DOCKER_USERMOD='true'

This will instead change the Instructor docker user's uid to your own uid.

Unable to migrate to newer database

If the failure is on 20251008075319_add_access_ignite_agent_permission.rb or similar AI permission migration, then the issue may be the custom roles and permissions copied over from Canvas prod. Might be a configuration thing, but the AI migrations seem to be expecting hardcoded roles that doesn't exist for us, even when creating the Canvas database from scratch.

Edit dbinit/02_canvas_development.sql and delete the section that copies all the UBC roles and role overrides. The role overrides section should start with COPY public.role_overrides. The roles section should start with COPY public.roles, as of 2025-10-08, the roles with id 1 to 16 are the default roles, delete the non-default roles (id 17 and up). Reset the database with the updated sql file and try the migration again.

Unfortunately, this does require recopying the roles and permissions from prod Canvas again.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 canvas-dev-only 镜像标签

docker pull docker.xuanyuan.run/lthub/canvas-dev-only:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull lthub/canvas-dev-only:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
lthub/canvas-dev-only
教程轩辕镜像功能与使用教程
定价查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 canvas-dev-only 镜像推荐

kasmweb/only-office logo

kasmweb/only-office

kasmweb
为Kasm Workspaces提供集成的OnlyOffice办公套件,支持文档、表格、演示文稿的在线编辑与协作,便于在容器化远程桌面环境中高效处理办公任务。
29 次收藏500万+ 次下载
6 小时前更新
onlyoffice/documentserver logo

onlyoffice/documentserver

ONLYOFFICE 在线办公套件
功能丰富的基于Web的办公套件,具备广泛的协作功能。
435 次收藏5000万+ 次下载
1 个月前更新
onlyoffice/communityserver logo

onlyoffice/communityserver

ONLYOFFICE 在线办公套件
这是一款集成化的一站式协作系统,可在单一平台内集中管理文档、项目、客户关系及邮件,支持团队成员实时协作,有效整合各类信息资源,避免多平台切换的繁琐,简化工作流程,助力提升团队整体办公效率与协同效果。
84 次收藏100万+ 次下载
2 个月前更新
onlyoffice/documentserver-ee logo

onlyoffice/documentserver-ee

ONLYOFFICE 在线办公套件
暂无描述
4 次收藏100万+ 次下载
4 天前更新
onlyoffice/documentserver-de logo

onlyoffice/documentserver-de

ONLYOFFICE 在线办公套件
ONLYOFFICE Developer Edition是面向开发者的办公协作解决方案开发工具包,提供丰富的API与SDK,支持将文档编辑(含文本文档、电子表格、演示文稿)、实时在线协作、版本管理及权限控制等核心功能无缝集成至企业自有应用或服务中,允许开发者根据业务需求自定义界面、扩展功能模块,并支持多平台部署与数据安全保障,助力快速构建定制化办公协作系统。
7 次收藏100万+ 次下载
4 天前更新
onlyoffice/documentserver-ie logo

onlyoffice/documentserver-ie

ONLYOFFICE 在线办公套件
ONLYOFFICE Document Server是一款在线办公套件,包含文本、电子表格和演示文稿的查看器与编辑器,完全兼容Office Open XML格式(.docx、.xlsx、.pptx),支持实时协作编辑。
6 次收藏10万+ 次下载
5 年前更新

查看更多 canvas-dev-only 相关镜像