gpt4 book ai didi

python-3.x - docker : "driver failed programming external connectivity on endpoint testcontainer"

转载 作者:行者123 更新时间:2023-12-04 13:59:48 27 4
gpt4 key购买 nike

在 manjaro VMware 中创建 python3 容器时出现以下错误:
docker: Error response from daemon: driver failed programming external connectivity on endpoint testcontainer (c55fc0dd481c36765fcd968118c3fbf5c7fa686cdfc625c485f963109b0f89e3): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5000 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))

我不明白是什么问题?

码头文件:

FROM python:3.7-alpine
RUN adduser -D test WORKDIR /home/testapp ADD ./webapp/requirements.txt requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
RUN pip3 install gunicorn
ADD ./webapp webapp/
ENV FLASK_APP app.py

USER test

EXPOSE 5000
ENTRYPOINT ["./app.py"]

最佳答案

为清楚起见,评论部分中链接的线程对我有用的答案是:

# Enter below command, it will clear all chains.
$ sudo iptables -t filter -F
$ iptables -t filter -X
# Then restart Docker Service using below comamnd
$ systemctl restart docker
https://github.com/moby/moby/issues/16816#issuecomment-327074574

关于python-3.x - docker : "driver failed programming external connectivity on endpoint testcontainer",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51734585/

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