-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
# 通过 Dockerfile 创建镜像 | ||
# 通过 Dockerfile 创建镜像 | ||
|
||
> 如果该文件中还依赖于其它配置文件,则需要采用 Zip 或是 Git 的形式进行构建 | ||
通过单 Dockerfile 文件的形式构建镜像。 | ||
|
||
### 模板 | ||
|
||
> 基础镜像仓库:https://hub.docker.com/r/donknap/dpanel | ||
DPanel 提供了 php、node、java、go、html 的基础的镜像。你可以在这些镜像的基础之上,构建出符合自己要求的镜像。 | ||
|
||
一般要遵循以下约定: | ||
|
||
- 基础镜像采用 alpine 系统 | ||
- 持久存储位于 /app 目录,此目录下的文件都将会持久化存储 | ||
- 如果程序中需要对外暴露访问,一般是绑定到 80 端口,创建容器时再做端口映射 | ||
- 对于 java go node 需要启动脚本的程序,将启动脚本定义在 RUN_COMMAND | ||
|
||
### 演示 | ||
|
||
基于php基础镜像,安装 pdo_pgsql 和 intl 扩展。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 构建镜像 | ||
|
||
### 构建任务 | ||
|
||
> 重复构建某个镜像时,要更改一下镜像的版本号,例如:donknap/test:1.0.1 | ||
当构建完成某个镜像后,系统会保留创建的时配置信息,以便于后可持续性构建镜像。 |