mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 04:18:46 +00:00
Merge pull request #203 from UnrealQuester/copy
Use COPY instead of ADD
This commit is contained in:
@@ -155,7 +155,7 @@ Baseimage-docker *鼓励* 通过runit来运行多进程.
|
||||
|
||||
### 在Dockerfile中:
|
||||
RUN mkdir /etc/service/memcached
|
||||
ADD memcached.sh /etc/service/memcached/run
|
||||
COPY memcached.sh /etc/service/memcached/run
|
||||
|
||||
注意脚本必须运行在后台的,**不能让他们进程进行daemonize/fork**.通常,后台进程会提供一个标志位或者配置文件.
|
||||
|
||||
@@ -177,7 +177,7 @@ baseimage-docker的初始化脚本 `/sbin/my_init`,在启动的时候进程运
|
||||
|
||||
### 在 Dockerfile中:
|
||||
RUN mkdir -p /etc/my_init.d
|
||||
ADD logtime.sh /etc/my_init.d/logtime.sh
|
||||
COPY logtime.sh /etc/my_init.d/logtime.sh
|
||||
|
||||
|
||||
<a name="environment_variables"></a>
|
||||
@@ -486,7 +486,7 @@ Baseimage-docker提供了一个灵活的方式运行只要一闪而过的命令,
|
||||
编辑你的dockerfile,来安装ssh public key:
|
||||
|
||||
## 安装你自己的public key.
|
||||
ADD your_key.pub /tmp/your_key.pub
|
||||
COPY your_key.pub /tmp/your_key.pub
|
||||
RUN cat /tmp/your_key.pub >> /root/.ssh/authorized_keys && rm -f /tmp/your_key.pub
|
||||
|
||||
重新创建你的镜像.一旦你创建成功,启动基于这个镜像的容器.
|
||||
|
||||
Reference in New Issue
Block a user