gpt4 book ai didi

docker - 从 dockerfile 构建 docker 镜像

转载 作者:行者123 更新时间:2023-12-02 01:52:20 25 4
gpt4 key购买 nike

这是我在终端中构建镜像的命令,sudo 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/

Base 中的 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

请帮助我,或者知道为什么我会收到此错误?我在 docker hub 上有一个帐户..............

提前谢谢您!

最佳答案

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

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

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

关于docker - 从 dockerfile 构建 docker 镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33772546/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com