Docker没有重新启动和构建

时间:2016-12-07 03:29:51

标签: docker docker-compose docker-machine

我用

停止了我的芹菜
var theUL = document.getElementsByClassName('h-topnav')[0];
console.log(theUL.querySelector('li:first-child a span:nth-child(1)').textContent);

但是当我尝试再次启动它并检查ps它没有重新启动时

<ul class="h-topnav menu horizontal">
    <li>
        <a to={"/"} ref="link" className="margin-top-10">
            <span className="underline-grey large underlined">
            <span className="font-black">H</span><span className="grey-dark">ome</span></span>
        </a>
    </li>
    <li>
        <a to={"/about"} ref="link" className="margin-top-10">
            <span className="underline-grey large underlined">
            <span className="font-black">A</span><span className="grey-dark">bout</span></span>
        </a>
        </li>
    <li>
        <a to={"/jobs"} ref="link" className="margin-top-10">
            <span className="underline-grey large underlined">
            <span className="font-black">J</span><span className="grey-dark">obs</span></span>
        </a>
    </li>
</ul>

当我再次尝试构建它时,会出现消息错误

docker-compose stop celery

我试过它运行它,但这是响应

docker-compose ps

radar_celery_1     celery worker -l info -A r ...   Exit 1                                               
radar_data_1       true                             Restarting                                           
radar_nginx_1      /usr/sbin/nginx                  Up           0.0.0.0:80->80/tcp                      
radar_postgres_1   /docker-entrypoint.sh postgres   Up           5432/tcp                                
radar_rabbitmq_1   docker-entrypoint.sh rabbi ...   Up           25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp 
radar_radar_1      bash -c /usr/local/bin/gun ...   Up           0.0.0.0:8002->8000/tcp                  
radar_redis_1      docker-entrypoint.sh redis ...   Up           6379/tcp                                

那么,我该如何解决这个问题呢?我希望修复导致我的python文件错误的那个

1 个答案:

答案 0 :(得分:0)

我实际上通过将文件复制到该容器来解决它。因此,即使容器未运行,也可以复制文件

1。)首先检查容器ID,使用-a查看所有容器,即使是那些没有运行的容器

docker ps -a

2。)复制需要更改的文件

docker-compose cp file <container_id>:/the/path/to/file

3.)尝试重新开始或构建图像