AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 784783
Accepted
Ali Mezgani
Ali Mezgani
Asked: 2016-06-19 07:07:19 +0800 CST2016-06-19 07:07:19 +0800 CST 2016-06-19 07:07:19 +0800 CST

无法启动 Docker 容器

  • 772

我使用烧瓶、nginx 和 uwsgi 构建了一个图像。

FROM ubuntu:14.04
MAINTAINER Ali Mezgani <xxxxxxxxx@gmail.com>

RUN apt-get update && apt-get -y install python python-dev  python-pip
RUN apt-get -y install supervisor
RUN apt-get -y install  nginx

COPY ./app /app

RUN mkdir /var/log/uwsgi/

RUN pip install -r ./app/requirements.txt

RUN rm -fr /etc/nginx/conf.d/*
RUN rm -fr /etc/nginx/sites-enabled/*

COPY app.conf /etc/supervisor/conf.d/app.conf

RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/sites-enabled/app.conf

expose 80
CMD ["supervisord", "-n"]
CMD ["nginx"]

这是我尝试启动 myapp 容器时得到的输出。

root@cygne:/data/flask# docker start myapp
Error response from daemon: No such container: myapp
Error: failed to start containers: myapp

最后是我拥有的图像的状态。

root@cygne:/data/flask# docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              91c4b97dc883        10 hours ago        434.1 MB
myapp               latest              3b9dd7cc7006        10 hours ago        434.1 MB
<none>              <none>              28f96039d2da        10 hours ago        434.1 MB
<none>              <none>              dbd7d20bb041        10 hours ago        434.1 MB
<none>              <none>              f29621c65c25        10 hours ago        434.1 MB
<none>              <none>              7d6d99d831c4        10 hours ago        434.1 MB
<none>              <none>              948cc751026f        10 hours ago        434.1 MB
<none>              <none>              afc13c68670c        10 hours ago        434.1 MB
<none>              <none>              90733b74c1ff        10 hours ago        434.1 MB
<none>              <none>              f8252e26afe5        10 hours ago        424.4 MB
<none>              <none>              4b16f8a9bfbb        10 hours ago        424.4 MB
<none>              <none>              126961e5d0b2        10 hours ago        418.6 MB
<none>              <none>              713635425c68        10 hours ago        400.1 MB
<none>              <none>              0755786fa8dc        10 hours ago        396.2 MB
<none>              <none>              3bc29edbc3a3        10 hours ago        188 MB
ubuntu              14.04               8f1bd21bd25c        3 weeks ago         188 MB
mysql               5.7                 2fd136002c22        3 weeks ago         378.4 MB

容器无法启动,我尝试了许多过程,例如清理缓存、重新启动 docker。这是我的系统日志中的内容:

localhost docker[6111]: time="2016-06-18T15:06:12.826760681Z" level=error msg="Handler for GET /v1.23/containers/myapp/json returned error: No such container: myapp"
linux docker containers flask
  • 1 1 个回答
  • 3169 Views

1 个回答

  • Voted
  1. Best Answer
    Christopher Perrin
    2016-06-19T07:25:09+08:002016-06-19T07:25:09+08:00

    您必须使用docker run从图像创建容器。有关如何使用它,请参阅Docker 运行参考。

    docker start是重新启动之前停止的容器。

    • 4

相关问题

  • 多操作系统环境的首选电子邮件客户端

  • 你最喜欢的 Linux 发行版是什么?[关闭]

  • 更改 PHP 的默认配置设置?

  • 保护新的 Ubuntu 服务器 [关闭]

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve