我有一个在 ubuntu docker-container 中运行的 Jenkins。为了通过构建进行 dockerized,我还需要在此容器中运行 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"]
最佳答案
我发现,它不是:
RUN apt-get update && apt-get install -y docker.io
但是
RUN curl -sSL https://get.docker.com/ | sh
不需要jenkinsSlave
关于ubuntu - 你如何从另一个 docker container-ubuntu 启动 docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46375387/