构build一个Ubuntu的Docker镜像

我对docker工人是全新的…但是我想要做以下的事情..

1) git clone git_repo 2) sudo apt-get install dependencies 3) cd to clone repo and do ./compile --flags=true make make install 4) Then curl filename -o output folder 5) tar xvf /path/to/curl_folder/filename.tar 

这就是它。 我正在通过文件,但我仍然失去了

这里是一篇关于如何克隆一个docker容器的私人仓库回购: http : //slash-dev-blog.me/docker-git.html这将有助于您的第1步和第2步。

要完成步骤3-5,可以将以下内容添加到Dockerfile中:

 WORKDIR /path/to/clone/repo RUN ./compile --flags=true RUN make RUN make install RUN curl filename -o output_folder RUN tar xvf /path/to/curl_folder/filename.tar 

准备好Dockerfile后,可以从Dockerfile构build一个映像。 这里是从Dockerfile创build图像的教程, http ://docs.docker.com/userguide/dockerimages/#creating-our-own-images

希望这可以帮助。 请让我知道你是否需要更多的帮助