问题描述
当我在具有Docker组成Dockerfile的目录中使用命令 docker-compose up
时,遇到以下错误。错误是在acp Times应用程序中有一个多余的括号,我删除了。当我再次尝试运行容器时,收到相同的错误消息,这是为什么?
When I use the command docker-compose up
in the directory that has the Docker compose Dockerfile, I am hit with the error below. The error was that in acp times app there was an extra brace, which I removed. When I try to run the container again I get the same error message, why is this?
我是docker的新手,如果需要任何其他信息来帮助解决问题,请告诉我,我什至不确定我在寻找什么,我关注了码头坞站的简单说明。难道是我的python代码中的其他内容不正确吗?
I am new to docker, if any additional info is needed to help solve the problem let me know, I'm not even sure what I am looking for, I followed the docker docks simple instructions. Could it be that something else in my python code is incorrect?
Attaching to brevets_web_1
web_1 | Traceback (most recent call last):
web_1 | File "flask_brevets.py", line 10, in <module>
web_1 | import acp_times # Brevet time calculations
web_1 | File "/app/acp_times.py", line 18
web_1 | minTable = [(1300,26), (1000,13.333)), (600, 11.428),
(400, 15), (200, 15)]
web_1 | ^
web_1 | SyntaxError: invalid syntax
brevets_web_1 exited with code 1
推荐答案
像@avigil一样,您需要重建图像才能更新它。
Like @avigil said you need to rebuild your image in order to update it.
如果要在一个命令中执行操作,可以键入:
If you want to do it in one command you can type:
如果确实要确保重新创建容器,请运行以下命令:
If you really want to be sure that your containers are recreated run the following command:
这篇关于Docker由于未解决的错误而无法构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!