从docker文件build立docker图像

这里是我在terminalbuild立镜像的sudo docker build -t actinbox3.2:latestsudo docker build -t actinbox3.2:latest

我得到这个错误

 " Step 0 : FROM iamdenmarkcontrevida/base Pulling repository iamdenmarkcontrevida/base INFO[0020] Repository not found" 

Dockerfile

  # Dockerfile for base image of actInbox FROM iamdenmarkcontrevida/base MAINTAINER Denmark Contrevida<DMcontrevida@gmail.com> # Config files COPY config /actinbox_config/ COPY script /actinbox_script/ COPY database /actinbox_db/ # Config pyenv RUN echo 'export PYENV_ROOT="/root/.pyenv"' >> /root/.bashrc && \ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /root/.bashrc && \ echo 'eval "$(pyenv init -)"' >> /root/.bashrc && \ # Config Nginx rm /etc/nginx/sites-enabled/default && \ ln -s /actinbox_config/actinbox.conf /etc/nginx/sites-enabled/actinbox.conf && \ # Config PostgreSQL rm /etc/postgresql/9.3/main/pg_hba.conf && \ ln -s /actinbox_config/pg_hba.conf /etc/postgresql/9.3/main/pg_hba.conf && \ # Create DB & Restore database sh /actinbox_config/create_db_actinbox.sh && \ # Delete template folder rm -r /actinbox_db/ 

在基地Mydockerfile

Dockerfile的基本形象的actInbox

  FROM ubuntu:14.04 MAINTAINER Denmark Contrevida<DMcontrevida@gmail.com> # Base services RUN apt-get update && apt-get install -y \ git nginx postgresql postgresql-contrib # Install Pyenv, Python 3.x, django, uWSGI & psycopg2 COPY config/install_pyenv.sh /tmp/install_pyenv.sh RUN sh /tmp/install_pyenv.sh 

请帮助我或任何想法为什么即时通讯这个错误? 我有一个docker中心帐户………..

先谢谢你!

基本上,它不能在iamdenmarkcontrevida/basefindiamdenmarkcontrevida/base image。

你build立/推动基础图像?

 docker build . docker tag <local-image-id> iamdenmarkcontrevida/base:latest docker push iamdenmarkcontrevida/base 

如果您只需要在本地运行,则无需推送。

所以你需要先构build基础图像,然后构buildactinbox3.2

例如(假设你有不同的Dockerfile名字)

 sudo docker build -t iamdenmarkcontrevida/base -f Dockerfile.base sudo docker build -t actinbox3.2 -f Docker.actinbox3.2 

标签latest是默认的,所以不需要在build命令中添加它。

你可以尝试打包器框架
这是创builddocker图像的最简单的方法。 它也支持许多其他types的机器映像。

https://www.packer.io/docs/builders/index.html