如何从另一个docker container-ubuntu启动docker

时间:2017-09-23 02:16:42

标签: ubuntu docker dockerfile

我有一个在ubuntu docker-container中运行的Jenkins。为了通过构建进行docker化,我还需要在此容器中运行docker 我的问题是我不了解如何启动守护进程的码头工具:

Dockerfile:

FROM ubuntu

# this is a non-interactive automated build - avoid some warning 

messages
ENV DEBIAN_FRONTEND noninteractive

# update dpkg repositories
RUN apt-get update 

# install wget
RUN apt-get install -y wget
RUN apt-get update -qq && apt-get install -qqy \
apt-transport-https \
ca-certificates \
curl \
tar \
lxc \
iptables

# Install Docker from Docker Inc. repositories.
RUN apt-get update && apt-get install -y docker.io

#install jenkins

...

 COPY jenkins.sh /usr/local/bin/jenkins.sh
 ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]

1 个答案:

答案 0 :(得分:0)

我发现,它不是:

   RUN apt-get update && apt-get install -y docker.io    

   RUN curl -sSL https://get.docker.com/ | sh

没有jenkinsSlave需要