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

paullamar3/docker-knowthen-elm

paullamar3
自动构建

A container for developing Elm programs using Atom.

2 次收藏下载次数: 0状态:自动构建维护者:paullamar3仓库类型:镜像最近更新:9 年前
让 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,让镜像更快,让人生更轻。
点击查看

Docker Container for Elm Development

So I enrolled in the knowthen course on Elm for Beginners. After watching the second lecture, Setting Up the Elm Development Environment, I couldn't help but wonder if there wasn't a Docker container out there that would make this process easier.

ASIDE: I've recently been trying to put all my development environments into containers. That way I don't have to worry about various environments interfering with each other. Also, I can pull down the container into any machine I'm working on and be assured of getting the same experience.

I found an official container for Node.js but nothing for Elm and nothing with both Node.js and Atom in the same container. (The instructor suggests using Atom as the editor and the lessons seemed to be geared toward Atom. Later, after I finish the course, I'll try to make a comparable Elm development container with Vim.) So I put this together.

This is an interactive container

The first thing to note about this container is that it is built to provide an interactive environment in which to code. Normally when one thinks of containers one envisions it containing a single application. However this is more difficult to accomplish when one wants to "containerize" something like an IDE. The make tools, linter and language formatting plug-ins of the editor all expect to find their corresponding language tools within the same file system the editor lives in. So this container has several applications bundled within it and has a correspondingly large size.

ASIDE: Eventually I'll experiment with containerizing the editor and development tools in separate containers and getting them to interact between containers. For now, though, that adds unnecessary complexity. Also, if you have problems getting the language tools to interact with the editor it's much easier to debug the issue when everything is in the same container.

How to use the container

This is a normal Docker container but I've added a utility shell script to assist with starting it up. In the https://github.com/paullamar3/docker-knowthen-elm there is a folder called utils containing the shell scripts Dstart, Dxtemp and startelm. You want to copy these scripts so that they live somewhere in your path. I've set up a directory ~/.my_bins in which I place little scripts like this. I then added this directory to the end of my $PATH variable.

Dxtemp and Dstart: The plum***g

NOTE: You can skip this section and go straight to the section on using the startelm script if you like. The startelm script uses Dstart and Dxtemp but you don't need to understand the "plum***g" to use the startelm command.

Dxtemp is a short script which turns off the X authentication temporarily. (You can specify the interval by passing in a value that represents the number of seconds you want the authentication turned off. The default value is 60 seconds.)

Dstart wraps some of the plum***g involved in starting a container that is to be used for developing code. It offers the following features:

  • Sets the Git global user.name and user.email in the container to match the host's settings.
  • Passes information into the container that lets you use the container with the same user id and user login name as you have on the host.
  • Makes sure the time in the container matches the time on the host.
  • Enables the container to use the host's X windows (without having to open up the X server to all users with the xhost command).
  • Uses the new Docker -net switch so that you can (for example) use your host's browser to read from the HTTP server that Elm uses. (In this case the elm reactor.)
  • Easier mounting of host volumes (which are mounted to the container's /media folder as if it were a removable device).

Here's an example of how I might use Dstart to run my containers:

Dstart -tiGg -n my_elm_dev -v "$PWD" paullamar3/docker-knowthen-elm:0.1.1

This example assumes that you are issuing the Dstart from the directory containing your project files (or where you want the project files to be) and that the Dstart script is in your path.

Of course you could start the container using docker run but that command would look something like this:

docker run -it -v /etc/localtime:/etc/localtime:ro -e DISPLAY --net=host \
     --name my_elm_dev -v "$PWD:/media/$(basename $PWD)" \
     -d "/media/$(basename $PWD)" \
     paullamar3/docker-knowthen-elm:0.1.1 \
     -u {User name} -U {User ID} -g {Git user name} -e {Git email} 

I much prefer to use Dstart.

startelm

The startelm script lets you run (via docker run) or restart (via docker start) you Elm development. To create and run your Elm container. There are a few different ways to create and run the container.

First, the simplest way:

startelm my_elm_dev

Assuming you don't already have a Docker container called "my_elm_dev", this command will create a new container of that name. The container should launch with the current working directory mounted as a folder in the container's /media/ directory. I cloned the /knowthen/elm repository on GitHub into a local folder and then ran startelm in that directory so that I would have all of the exercises accessible to the container.

An Atom editor should open automatically (give it about 10 seconds). The terminal from which you ran the startelm command will also switch to the container and leave you at a bash pro*** inside the container.

This approach works fine on my LMDE (Linux Mint Debian Edition) computer. On that computer my user is a member of the docker group which means that I can execute Docker commands without using sudo.

Second, the slightly more secure way:

startelm -s my_elm_dev

Use this version of the script if you have chosen not to add yourself to the docker group. (If you have to type sudo docker ... evertime you run a Docker command then this version is for you.

Third, the "no X authentication" way:

startelm -x my_elm_dev

While testing this image I discovered that although it works fine on my LMDE machine, the Atom processor could not access the X server when I ran the image on my Mint 17.3 machine. I spent a very little bit of time looking into this but could not figure out why the Mint 17.3 machine was not sharing its display with the container. For now I coded a quick hack in the form of the -x switch for the startelm command. Specifying -x tells the script to disable the X authentication on the computer for twenty seconds while the container is being run (or restarted). Specifying -x is a good way to ensure the container can access you X server but it is insecure. For twenty seconds anyone could connect to your X windows. I would try running without -x first; only use it if you have to.

WARNING: The -x switch actually runs the xhost command to disable and then reenable the X authentication. If you are the only user of your machine, you are probably OK. However if you are in a multi-user Linux environment you should use the -x switch with caution.

ASIDE: When I run xhost on each machine I get back the same results: SI:localuser:{user name}. So I'm not sure why I need the -x switch on one but I don't need it on the other. At some point I'll learn more about the X authority system and see if there is a better way around this issue. For now, though, this hack should get us up and running in the mean time.

Of course the -s and -x switches can be com***ed into -sx if you need both.

Starting the container the first time

The container should be configured so that you can begin the first set of exercises (i.e. in the 01 functions folder). Assuming you started the container from within this folder or its parent you should be able to type atom in the container to get the Atom editor on your desktop. You can then open the files in that folder and proceed as you normally would.

NOTE: This container does not have a browser on it. When you get to the part where you start elm reactive, open the browser on your host and point to the localhost:8000 just as you would do if Elm reactive were running on your host.

Progressing through the exercises

After you have finished with the exercise for the day, close Atom and then issue exit form the bash shell in the container. This will leave the container in a "stopped" status. Later you can revisit the container by using the docker start command to pick up where you left off. Any packages you've installed thus far should still be there in the container.

Note that you should issue the same elmstart command to restart an existing container that you used to initially create it. The startelm script checks for the container name in the existing containers and simply restarts the container if it finds it.

But I want to learn how to set Elm up myself ...

By using this container you skip having to do the environment setup yourself. Some people might prefer to set up their own environment from scratch; I totally get that. Me, I'd rather get into learning the Elm language. This lets me get straight into the programming without having to wrestle with mundane setup issues or worrying that I might accidentally install something that will break something else. Instead of having to set up my development environment on my desktop and my laptop, or in some other virtual machine, I can simply pull the container and go no matter what machine (virtual or otherwise) I'm using.

I'm setting this image up in DockerHub as an automated build so that you can see how I built the container. Learning how to set Elm up in a container is (I would argue) more valuable than learning how to set it up normally.

Work in progress ...

So I've actually used this container (version 0.1.2 as I write this) to finish the first three sets of exercises. No trouble thus far. Throughout the rest of the week I'll be finishing the rest of the course and will make fixes to the container whenever I run across something. Feel free to try this out and post any issues you find in my repository on GitHub.

I did this "for fun"

I'm not affiliated with Docker, knowthen or Elm. I'm just a guy taking the course. I hope people find this image useful. If you have issues it might be faster for you to debug them yourself as I will only be checking the GitHub repository about once a week.

All the code used to make this image is in the repository. Later, when I have more time, I'll post a list of links referencing the wonderful posts about Docker that helped me learn how to put this together.

镜像拉取方式

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

轩辕镜像加速拉取命令点我查看更多 docker-knowthen-elm 镜像标签

docker pull docker.xuanyuan.run/paullamar3/docker-knowthen-elm:<标签>

使用方法:

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

DockerHub 原生拉取命令

docker pull paullamar3/docker-knowthen-elm:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 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访问体验非常流畅,大镜像也能快速完成下载。"

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

更多 docker-knowthen-elm 镜像推荐

docker/dockerfile logo

docker/dockerfile

Docker 官方工具与组件镜像
这些是官方提供的Dockerfile前端镜像,主要功能是支持通过BuildKit构建Dockerfile,作为构建流程中的关键前端工具,能够有效配合BuildKit提升Dockerfile的构建效率、安全性与灵活性,为开发者提供官方认可的标准化构建方案,适用于各类基于Docker的应用开发与部署场景,确保构建过程的稳定可靠及操作便捷性。
128 次收藏5亿+ 次下载
17 天前更新
docker/dockerfile-copy logo

docker/dockerfile-copy

Docker 官方工具与组件镜像
此Docker镜像已被弃用。
1 次收藏5000万+ 次下载
7 年前更新
docker/docker-model-backend-llamacpp logo

docker/docker-model-backend-llamacpp

Docker 官方工具与组件镜像
暂无描述
2 次收藏5000万+ 次下载
23 天前更新
docker/welcome-to-docker logo

docker/welcome-to-docker

Docker 官方工具与组件镜像
供Docker新手入门使用的Docker镜像。
73 次收藏500万+ 次下载
11 个月前更新
docker/docker-mcp-cli-desktop-module logo

docker/docker-mcp-cli-desktop-module

Docker 官方工具与组件镜像
暂无描述
500万+ 次下载
9 天前更新
docker/desktop-docker-debug-service logo

docker/desktop-docker-debug-service

Docker 官方工具与组件镜像
暂无描述
1000万+ 次下载
5 个月前更新

查看更多 docker-knowthen-elm 相关镜像