如何从另一个码头集装箱启动码头-ubuntu
问题描述:
我有一个运行在Ubuntu码头集装箱中的Jenkins。为了通过构建以dockerized,我需要在这个容器 我的问题是,我不知道如何启动守护码头工人也跑码头工人:如何从另一个码头集装箱启动码头-ubuntu
的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"]
答
我觉得,这不是:
RUN apt-get update && apt-get install -y docker.io
但
RUN curl -sSL https://get.docker.com/ | sh
没有jenkinsSlave需要
你应该使用官方的'泊坞窗:dind'图像,并从主文件夹'-v /var/run/docker.sock:/var/run/docker传递套接字。袜子'而且你需要它在詹金斯奴隶而不是主詹金斯 –