Haxe是一种现代、高级、静态类型的编程语言,支持多种编译目标。
注意:这是https://hub.docker.com/_/haxe的`amd64`架构构建版本的"每架构"仓库——更多信息,请参见官方镜像文档中的https://github.com/docker-library/official-images#architectures-other-than-amd64和官方镜像FAQ中的https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what。
快速参考
-
维护者:
https://github.com/HaxeFoundation/docker-library-haxe -
获取帮助:
https://dockr.ly/comm-slack、Server Fault、https://unix.stackexchange.com/help/on-topic或https://stackoverflow.com/help/on-topic
支持的标签及对应的Dockerfile链接
(参见FAQ中的https://github.com/docker-library/faq#whats-the-difference-between-shared-and-simple-tags)
Simple Tags
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.3/bookworm/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.3/bullseye/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/29c1c10f60a3d5d96c92c23ed8d07f5393c962b5/4.3/alpine3.22/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/29c1c10f60a3d5d96c92c23ed8d07f5393c962b5/4.3/alpine3.21/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.3/alpine3.20/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.3/alpine3.19/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/5.0/bookworm/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/5.0/bullseye/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/29c1c10f60a3d5d96c92c23ed8d07f5393c962b5/5.0/alpine3.22/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/29c1c10f60a3d5d96c92c23ed8d07f5393c962b5/5.0/alpine3.21/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/5.0/alpine3.20/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/5.0/alpine3.19/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.2/bookworm/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.2/bullseye/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.2/alpine3.20/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.2/alpine3.19/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.1/bullseye/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.1/alpine3.20/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.1/alpine3.19/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.0/bullseye/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.0/alpine3.20/Dockerfile
-
https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.0/alpine3.19/Dockerfile
Shared Tags
-
4.3.7,4.3,latest:- https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.3/bookworm/Dockerfile
-
5.0.0-preview.1,5.0.0,5.0:- https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/5.0/bookworm/Dockerfile
-
4.2.5,4.2:- https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.2/bookworm/Dockerfile
-
4.1.5,4.1:- https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.1/bullseye/Dockerfile
-
4.0.5,4.0:- https://github.com/HaxeFoundation/docker-library-haxe/blob/2636eee6b67d0c99730e4ab1d0d752d66809e3fa/4.0/bullseye/Dockerfile
快速参考(续)
-
提交问题的位置:
https://github.com/HaxeFoundation/docker-library-haxe/issues?q= -
支持的架构:(https://github.com/docker-library/official-images#architectures-other-than-amd64)
https://hub.docker.com/r/amd64/haxe/, https://hub.docker.com/r/arm32v7/haxe/, https://hub.docker.com/r/arm64v8/haxe/, https://hub.docker.com/r/winamd64/haxe/ -
已发布镜像工件详情:
https://github.com/docker-library/repo-info/blob/master/repos/haxe (https://github.com/docker-library/repo-info/commits/master/repos/haxe)
(镜像元数据、传输大小等) -
镜像更新:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fhaxe
https://github.com/docker-library/official-images/blob/master/library/haxe (https://github.com/docker-library/official-images/commits/master/library/haxe) -
本描述的来源:
https://github.com/docker-library/docs/tree/master/haxe (https://github.com/docker-library/docs/commits/master/haxe)
什么是Haxe?
Haxe是一个开源工具包,基于现代、高级、严格类型的编程语言、跨编译器、完整的跨平台标准库以及访问各平台原生功能的方式。
Haxe编译器可以输出多种源代码和二进制文件。截至Haxe 3.4.0-rc.1,Haxe编译器可目标化为JavaScript、Java、C#、C++、Python、PHP、Flash SWF、ActionScript 3、Lua和Neko。
关于此镜像
此镜像包含一个最小化的Haxe工具包:
haxe编译器及其标准库haxelib库管理器neko虚拟机
如何使用此镜像
使用此镜像最直接的方式是将Haxe容器同时用作构建和运行环境。在Dockerfile中,编写如下内容可编译并运行项目:
dockerfileFROM docker.xuanyuan.run/amd64/haxe:3.4 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app # 安装依赖 COPY *.hxml /usr/src/app/ RUN yes | haxelib install all # 编译项目 COPY . /usr/src/app RUN haxe build.hxml # 容器启动时运行输出 CMD ["neko", "Main.n"]
然后,构建并运行Docker镜像:
console$ docker build -t my-haxe-app . $ docker run -it --rm --name my-running-app my-haxe-app
使用onbuild变体
有onbuild变体包含多个ONBUILD触发器,可执行上述Dockerfile中的所有步骤,但不包含运行编译输出的CMD指令。
使用amd64/haxe:3.4-onbuild重写上述Dockerfile,我们将得到:
dockerfileFROM docker.xuanyuan.run/amd64/haxe:3.4-onbuild # 容器启动时运行输出 CMD ["neko", "Main.n"]
onbuild变体假设主编译hxml文件名为build.hxml。要使用其他hxml文件,在构建时设置BUILD_HXML构建参数:
console$ docker build -t my-haxe-app --build-arg BUILD_HXML=compile.hxml .
镜像变体
amd64/haxe镜像有多种版本,每种版本设计用于特定用例。
amd64/haxe:<version>
这是默认镜像。如果不确定需求,可能需要使用此版本。它设计为既可作为临时容器(挂载源代码并启动容器以运行应用),也可作为构建其他镜像的基础。
某些标签可能包含bookworm或bullseye等名称,这些是https://wiki.debian.org/DebianReleases的版本代号,表示镜像基于哪个发行版。如果镜像需要安装除自带包之外的其他包,可能需要显式指定这些代号以减少Debian新版本发布时的中断。
amd64/haxe:<version>-alpine
此镜像基于流行的https://alpinelinux.org,可在https://hub.docker.com/_/alpine中获取。Alpine Linux比大多数发行版基础镜像小得多(约5MB),因此通常会生成更精简的镜像。
此变体在最终镜像大小尽可能小是主要关注点时非常有用。需要注意的是,它使用https://musl.libc.org而非https://www.etalabs.net/compare_libcs.html,
amd64 命名空间的其他可用镜像:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务