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

标签 ubuntu docker dockerfile

我有一个在 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/

相关文章:

shell - 当 splunk 第一次在 docker 容器中启动时,是否可以跳过许可协议(protocol)页面?

apache - 创建 .htaccess 文件(Ubuntu Server 12.04 w/Apache2)

mysql - 如何在外部磁盘(mac os)上存储带有mysql数据的命名docker卷?

linux - 如何评估 Linux 中特定命令/docker 的 CPU 和内存使用情况?

azure - 在 Azure DevOps 上运行 DockerFile 构建命令时找不到项目

docker - 无法从前端解析 docker compose 服务名称

ajax - 从 ubuntu 服务器向浏览器推送数据

ubuntu - 无法在模拟器中启动 Intel XDK 的调试器

docker - var/jenkins_home 文件夹位于哪里?

docker - docker-compose.yml 上的 "ports"是否与 Dockerfile 上的 EXPOSE 效果相同?