从 dockerfile 构建 docker 镜像

Den*_*tre 6 docker

这是我在终端中构建映像的命令,sudo docker build -t actinbox3.2:latest.

我收到这个错误

" Step 0 : FROM iamdenmarkcontrevida/base
        Pulling repository iamdenmarkcontrevida/base
        INFO[0020] Repository not found"
Run Code Online (Sandbox Code Playgroud)

文件

    # 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/
Run Code Online (Sandbox Code Playgroud)

基地中的 Mydockerfile

actInbox 基础镜像的 Dockerfile

    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
Run Code Online (Sandbox Code Playgroud)

请帮助我或知道为什么我会收到此错误?我在 docker hub 有一个账号…………

先感谢您!

Ric*_*ico 5

基本上是在dockerhub中找不到iamdenmarkcontrevida/base镜像。

您是否构建/推送了基础镜像?

docker build .
docker tag <local-image-id> iamdenmarkcontrevida/base:latest
docker push iamdenmarkcontrevida/base
Run Code Online (Sandbox Code Playgroud)