大家早上好,
每次启动命令docker-compose up时,我都会遇到一个问题。在一开始,有两条红线可以说明:
⠿ api Error
⠿ worker Errorapi和worker是我的两个容器的名称。奇怪的是,在我的容器的整个安装过程中没有任何问题。一切都很好。所以我想知道是否有人已经经历过这样的事情,因为我没有在这个话题上找到任何东西。
下面是docker-组合文件:
version: "3"
services:
redis:
image: redis:6.2-alpine
restart: always
ports:
- "${REDIS_PORT}:6379"
container_name: container_redis
worker:
volumes:
- ./api:/app/
- ./worker:/app2/
build:
dockerfile: ./worker/Dockerfile
image: image_worker
container_name: container_worker
depends_on:
- redis
api:
volumes:
- ./api:/app/
- /var/run/docker.sock:/var/run/docker.sock
build:
dockerfile: ./api/Dockerfile
image: image_api
container_name: container_api
ports:
- "${API_PORT}:8050"
depends_on:
- redis
- worker下面是worker Dockerfile:
FROM archlinux:latest
RUN export http_proxy="http://xx.xx.xx.xx:8080" \
&& export https_proxy="http://xx.xx.xx.xx:8080" \
&& pacman-db-upgrade \
&& pacman -Syyu --noconfirm \
&& pacman -S python --noconfirm \
&& pacman -S python-pip --noconfirm \
&& pip install requests \
&& pip install redis
WORKDIR /app
CMD python /app2/worker.py这是api Dockerfile:
FROM archlinux:latest
COPY api/requirements.txt ./
RUN export http_proxy="http://xx.xx.xx.xx:8080" \
&& export https_proxy="http://xx.xx.xx.xx:8080" \
&& pacman-db-upgrade \
&& pacman -Syyu --noconfirm \
&& pacman -S python --noconfirm \
&& pacman -S python-pip --noconfirm \
&& pip install --no-cache-dir -r requirements.txt
WORKDIR /app
CMD chmod a+x entrypoint.sh && ./entrypoint.sh请找到docker-compose up command的结果
[david@user_01 project]$ docker-compose up
[+] Running 0/2
⠿ api Error 1.7s
⠿ worker Error 1.6s
Sending build context to Docker daemon 174.3MB
Step 1/4 : FROM archlinux:latest
latest: Pulling from library/archlinux
ed520c7fd61b: Pull complete
6a1d554dffe9: Pull complete
Digest: sha256:5b8fd376c75d2480080201961c71c33af621632cb5840d67214a5aff8f05577b
Status: Downloaded newer image for archlinux:latest
---> 481b70173ad4
Step 2/4 : RUN export http_proxy="http://xx.xx.xx.xx:8080" && export https_proxy="http://xx.xx.xx.xx:8080" && pacman-db-upgrade && pacman -Syyu --noconfirm && pacman -S python --noconfirm && pacman -S python-pip --noconfirm && pip install requests && pip install redis
---> Running in 6592ca17346b
:: Synchronizing package databases...
core downloading...
extra downloading...
community downloading...
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Package (5) Old Version New Version Net Change Download Size
core/curl 7.81.0-3 7.82.0-1 0.01 MiB 1.10 MiB
core/expat 2.4.6-1 2.4.7-1 0.00 MiB 0.12 MiB
core/gpgme 1.17.0-2 1.17.1-1 0.00 MiB 0.43 MiB
core/hwdata 0.356-1 0.357-1 0.00 MiB 0.46 MiB
core/pacman 6.0.1-3 6.0.1-4 0.00 MiB 0.89 MiB
Total Download Size: 2.99 MiB
Total Installed Size: 10.13 MiB
Net Upgrade Size: 0.02 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
curl-7.82.0-1-x86_64 downloading...
pacman-6.0.1-4-x86_64 downloading...
hwdata-0.357-1-any downloading...
gpgme-1.17.1-1-x86_64 downloading...
expat-2.4.7-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
upgrading curl...
upgrading expat...
upgrading gpgme...
upgrading hwdata...
upgrading pacman...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...
Package (3) New Version Net Change Download Size
core/gdbm 1.23-1 0.77 MiB 0.26 MiB
core/libnsl 2.0.0-2 0.07 MiB 0.02 MiB
core/python 3.10.2-1 53.85 MiB 11.35 MiB
Total Download Size: 11.63 MiB
Total Installed Size: 54.69 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-3.10.2-1-x86_64 downloading...
gdbm-1.23-1-x86_64 downloading...
libnsl-2.0.0-2-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing gdbm...
installing libnsl...
installing python...
Optional dependencies for python
python-setuptools
python-pip
sqlite [installed]
mpdecimal: for decimal
xz: for lzma [installed]
tk: for tkinter
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...
Package (31) New Version Net Change Download Size
extra/python-appdirs 1.4.4-6 0.07 MiB 0.01 MiB
community/python-cachecontrol 1:0.12.6-4 0.10 MiB 0.03 MiB
extra/python-cffi 1.15.0-3 1.02 MiB 0.22 MiB
extra/python-chardet 4.0.0-5 2.10 MiB 0.19 MiB
community/python-colorama 0.4.4-6 0.08 MiB 0.02 MiB
community/python-contextlib2 0.6.0.post1-6 0.05 MiB 0.02 MiB
extra/python-cryptography 36.0.1-1 4.14 MiB 0.93 MiB
community/python-distlib 0.3.4-1 0.93 MiB 0.18 MiB
community/python-distro 1.7.0-1 0.16 MiB 0.03 MiB
community/python-html5lib 1.1-11 1.34 MiB 0.21 MiB
extra/python-idna 3.3-4 0.66 MiB 0.09 MiB
community/python-more-itertools 8.12.0-1 0.48 MiB 0.07 MiB
community/python-msgpack 1.0.3-1 0.25 MiB 0.07 MiB
extra/python-ordered-set 4.0.2-6 0.06 MiB 0.01 MiB
extra/python-packaging 20.9-7 0.18 MiB 0.05 MiB
extra/python-pep517 0.12.0-4 0.13 MiB 0.03 MiB
extra/python-ply 3.11-10 0.31 MiB 0.08 MiB
community/python-progress 1.6-5 0.04 MiB 0.01 MiB
extra/python-pycparser 2.21-3 1.39 MiB 0.19 MiB
extra/python-pyopenssl 21.0.0-5 0.53 MiB 0.08 MiB
extra/python-pyparsing 3.0.1-1 0.93 MiB 0.16 MiB
extra/python-requests 2.27.1-1 0.45 MiB 0.09 MiB
extra/python-resolvelib 0.5.5-4 0.10 MiB 0.02 MiB
extra/python-retrying 1.3.3-13 0.03 MiB 0.01 MiB
extra/python-setuptools 1:59.3.0-1 2.96 MiB 0.55 MiB
extra/python-six 1.16.0-5 0.09 MiB 0.02 MiB
community/python-toml 0.10.2-7 0.14 MiB 0.03 MiB
extra/python-tomli 2.0.0-1 0.06 MiB 0.02 MiB
extra/python-urllib3 1.26.8-1 0.70 MiB 0.18 MiB
community/python-webencodings 0.5.1-9 0.06 MiB 0.02 MiB
extra/python-pip 21.0-1 1.56 MiB 0.41 MiB
Total Download Size: 4.05 MiB
Total Installed Size: 21.13 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-cryptography-36.0.1-1-x86_64 downloading...
python-setuptools-1:59.3.0-1-any downloading...
python-pip-21.0-1-any downloading...
python-cffi-1.15.0-3-x86_64 downloading...
python-html5lib-1.1-11-any downloading...
python-chardet-4.0.0-5-any downloading...
python-pycparser-2.21-3-any downloading...
python-urllib3-1.26.8-1-any downloading...
python-distlib-0.3.4-1-any downloading...
python-pyparsing-3.0.1-1-any downloading...
python-requests-2.27.1-1-any downloading...
python-idna-3.3-4-any downloading...
python-pyopenssl-21.0.0-5-any downloading...
python-ply-3.11-10-any downloading...
python-more-itertools-8.12.0-1-any downloading...
python-msgpack-1.0.3-1-x86_64 downloading...
python-packaging-20.9-7-any downloading...
python-toml-0.10.2-7-any downloading...
python-pep517-0.12.0-4-any downloading...
python-distro-1.7.0-1-any downloading...
python-cachecontrol-1:0.12.6-4-any downloading...
python-colorama-0.4.4-6-any downloading...
python-resolvelib-0.5.5-4-any downloading...
python-six-1.16.0-5-any downloading...
python-tomli-2.0.0-1-any downloading...
python-webencodings-0.5.1-9-any downloading...
python-contextlib2-0.6.0.post1-6-any downloading...
python-appdirs-1.4.4-6-any downloading...
python-progress-1.6-5-any downloading...
python-ordered-set-4.0.2-6-any downloading...
python-retrying-1.3.3-13-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-appdirs...
installing python-msgpack...
installing python-urllib3...
Optional dependencies for python-urllib3
python-pysocks: SOCKS support
python-brotli: Brotli support
python-pyopenssl: security support [pending]
python-idna: security support [pending]
installing python-chardet...
installing python-idna...
installing python-requests...
Optional dependencies for python-requests
python-pysocks: SOCKS proxy support
installing python-cachecontrol...
Optional dependencies for python-cachecontrol
python-lockfile: for the FileCache
installing python-colorama...
installing python-contextlib2...
installing python-distlib...
installing python-more-itertools...
installing python-ordered-set...
installing python-pyparsing...
Optional dependencies for python-pyparsing
python-railroad-diagrams: for generating Railroad Diagrams
python-jinja: for generating Railroad Diagrams
installing python-six...
installing python-packaging...
installing python-setuptools...
installing python-distro...
installing python-webencodings...
installing python-html5lib...
Optional dependencies for python-html5lib
python-lxml: lxml treebuilder
python-genshi: genshi treewalker
installing python-tomli...
installing python-pep517...
installing python-progress...
installing python-retrying...
installing python-resolvelib...
installing python-toml...
installing python-ply...
installing python-pycparser...
installing python-cffi...
installing python-cryptography...
installing python-pyopenssl...
installing python-pip...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Requirement already satisfied: requests in /usr/lib/python3.10/site-packages (2.27.1)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.10/site-packages (from requests) (4.0.0)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.10/site-packages (from requests) (3.3)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.10/site-packages (from requests) (1.26.8)
Collecting redis
Downloading redis-4.1.4-py3-none-any.whl (175 kB)
Requirement already satisfied: packaging>=20.4 in /usr/lib/python3.10/site-packages (from redis) (20.9)
Collecting deprecated>=1.2.3
Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting wrapt<2,>=1.10
Downloading wrapt-1.14.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3.10/site-packages (from packaging>=20.4->redis) (3.0.1)
Installing collected packages: wrapt, deprecated, redis
Successfully installed deprecated-1.2.13 redis-4.1.4 wrapt-1.14.0
Removing intermediate container 6592ca17346b
---> 57ddff99e2fa
Step 3/4 : WORKDIR /app
---> Running in fed0f60d9466
Removing intermediate container fed0f60d9466
---> 1893670a96f3
Step 4/4 : CMD python /app2/worker.py
---> Running in 467d384c1a3e
Removing intermediate container 467d384c1a3e
---> 74704ef85f41
Successfully built 74704ef85f41
Successfully tagged image_worker:latest
Sending build context to Docker daemon 174.3MB
Step 1/5 : FROM archlinux:latest
---> 481b70173ad4
Step 2/5 : COPY api/requirements.txt ./
---> d99af5aa95f3
Step 3/5 : RUN export http_proxy="http://xx.xx.xx.xx:8080" && export https_proxy="http://xx.xx.xx.xx:8080" && pacman-db-upgrade && pacman -Syyu --noconfirm && pacman -S python --noconfirm && pacman -S python-pip --noconfirm && pip install --no-cache-dir -r requirements.txt
---> Running in baa81b5392e2
:: Synchronizing package databases...
core downloading...
extra downloading...
community downloading...
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Package (5) Old Version New Version Net Change Download Size
core/curl 7.81.0-3 7.82.0-1 0.01 MiB 1.10 MiB
core/expat 2.4.6-1 2.4.7-1 0.00 MiB 0.12 MiB
core/gpgme 1.17.0-2 1.17.1-1 0.00 MiB 0.43 MiB
core/hwdata 0.356-1 0.357-1 0.00 MiB 0.46 MiB
core/pacman 6.0.1-3 6.0.1-4 0.00 MiB 0.89 MiB
Total Download Size: 2.99 MiB
Total Installed Size: 10.13 MiB
Net Upgrade Size: 0.02 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
curl-7.82.0-1-x86_64 downloading...
pacman-6.0.1-4-x86_64 downloading...
hwdata-0.357-1-any downloading...
gpgme-1.17.1-1-x86_64 downloading...
expat-2.4.7-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
upgrading curl...
upgrading expat...
upgrading gpgme...
upgrading hwdata...
upgrading pacman...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...
Package (3) New Version Net Change Download Size
core/gdbm 1.23-1 0.77 MiB 0.26 MiB
core/libnsl 2.0.0-2 0.07 MiB 0.02 MiB
core/python 3.10.2-1 53.85 MiB 11.35 MiB
Total Download Size: 11.63 MiB
Total Installed Size: 54.69 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-3.10.2-1-x86_64 downloading...
gdbm-1.23-1-x86_64 downloading...
libnsl-2.0.0-2-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing gdbm...
installing libnsl...
installing python...
Optional dependencies for python
python-setuptools
python-pip
sqlite [installed]
mpdecimal: for decimal
xz: for lzma [installed]
tk: for tkinter
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...
Package (31) New Version Net Change Download Size
extra/python-appdirs 1.4.4-6 0.07 MiB 0.01 MiB
community/python-cachecontrol 1:0.12.6-4 0.10 MiB 0.03 MiB
extra/python-cffi 1.15.0-3 1.02 MiB 0.22 MiB
extra/python-chardet 4.0.0-5 2.10 MiB 0.19 MiB
community/python-colorama 0.4.4-6 0.08 MiB 0.02 MiB
community/python-contextlib2 0.6.0.post1-6 0.05 MiB 0.02 MiB
extra/python-cryptography 36.0.1-1 4.14 MiB 0.93 MiB
community/python-distlib 0.3.4-1 0.93 MiB 0.18 MiB
community/python-distro 1.7.0-1 0.16 MiB 0.03 MiB
community/python-html5lib 1.1-11 1.34 MiB 0.21 MiB
extra/python-idna 3.3-4 0.66 MiB 0.09 MiB
community/python-more-itertools 8.12.0-1 0.48 MiB 0.07 MiB
community/python-msgpack 1.0.3-1 0.25 MiB 0.07 MiB
extra/python-ordered-set 4.0.2-6 0.06 MiB 0.01 MiB
extra/python-packaging 20.9-7 0.18 MiB 0.05 MiB
extra/python-pep517 0.12.0-4 0.13 MiB 0.03 MiB
extra/python-ply 3.11-10 0.31 MiB 0.08 MiB
community/python-progress 1.6-5 0.04 MiB 0.01 MiB
extra/python-pycparser 2.21-3 1.39 MiB 0.19 MiB
extra/python-pyopenssl 21.0.0-5 0.53 MiB 0.08 MiB
extra/python-pyparsing 3.0.1-1 0.93 MiB 0.16 MiB
extra/python-requests 2.27.1-1 0.45 MiB 0.09 MiB
extra/python-resolvelib 0.5.5-4 0.10 MiB 0.02 MiB
extra/python-retrying 1.3.3-13 0.03 MiB 0.01 MiB
extra/python-setuptools 1:59.3.0-1 2.96 MiB 0.55 MiB
extra/python-six 1.16.0-5 0.09 MiB 0.02 MiB
community/python-toml 0.10.2-7 0.14 MiB 0.03 MiB
extra/python-tomli 2.0.0-1 0.06 MiB 0.02 MiB
extra/python-urllib3 1.26.8-1 0.70 MiB 0.18 MiB
community/python-webencodings 0.5.1-9 0.06 MiB 0.02 MiB
extra/python-pip 21.0-1 1.56 MiB 0.41 MiB
Total Download Size: 4.05 MiB
Total Installed Size: 21.13 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-cryptography-36.0.1-1-x86_64 downloading...
python-setuptools-1:59.3.0-1-any downloading...
python-pip-21.0-1-any downloading...
python-cffi-1.15.0-3-x86_64 downloading...
python-html5lib-1.1-11-any downloading...
python-chardet-4.0.0-5-any downloading...
python-pycparser-2.21-3-any downloading...
python-urllib3-1.26.8-1-any downloading...
python-distlib-0.3.4-1-any downloading...
python-pyparsing-3.0.1-1-any downloading...
python-requests-2.27.1-1-any downloading...
python-idna-3.3-4-any downloading...
python-pyopenssl-21.0.0-5-any downloading...
python-ply-3.11-10-any downloading...
python-more-itertools-8.12.0-1-any downloading...
python-msgpack-1.0.3-1-x86_64 downloading...
python-packaging-20.9-7-any downloading...
python-toml-0.10.2-7-any downloading...
python-pep517-0.12.0-4-any downloading...
python-distro-1.7.0-1-any downloading...
python-cachecontrol-1:0.12.6-4-any downloading...
python-colorama-0.4.4-6-any downloading...
python-resolvelib-0.5.5-4-any downloading...
python-six-1.16.0-5-any downloading...
python-tomli-2.0.0-1-any downloading...
python-webencodings-0.5.1-9-any downloading...
python-contextlib2-0.6.0.post1-6-any downloading...
python-appdirs-1.4.4-6-any downloading...
python-progress-1.6-5-any downloading...
python-ordered-set-4.0.2-6-any downloading...
python-retrying-1.3.3-13-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-appdirs...
installing python-msgpack...
installing python-urllib3...
Optional dependencies for python-urllib3
python-pysocks: SOCKS support
python-brotli: Brotli support
python-pyopenssl: security support [pending]
python-idna: security support [pending]
installing python-chardet...
installing python-idna...
installing python-requests...
Optional dependencies for python-requests
python-pysocks: SOCKS proxy support
installing python-cachecontrol...
Optional dependencies for python-cachecontrol
python-lockfile: for the FileCache
installing python-colorama...
installing python-contextlib2...
installing python-distlib...
installing python-more-itertools...
installing python-ordered-set...
installing python-pyparsing...
Optional dependencies for python-pyparsing
python-railroad-diagrams: for generating Railroad Diagrams
python-jinja: for generating Railroad Diagrams
installing python-six...
installing python-packaging...
installing python-setuptools...
installing python-distro...
installing python-webencodings...
installing python-html5lib...
Optional dependencies for python-html5lib
python-lxml: lxml treebuilder
python-genshi: genshi treewalker
installing python-tomli...
installing python-pep517...
installing python-progress...
installing python-retrying...
installing python-resolvelib...
installing python-toml...
installing python-ply...
installing python-pycparser...
installing python-cffi...
installing python-cryptography...
installing python-pyopenssl...
installing python-pip...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Collecting Flask
Downloading Flask-2.0.3-py3-none-any.whl (95 kB)
Collecting redis
Downloading redis-4.1.4-py3-none-any.whl (175 kB)
Collecting dash
Downloading dash-2.2.0-py3-none-any.whl (8.5 MB)
Collecting pandas
Downloading pandas-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
Collecting dash-bootstrap-components
Downloading dash_bootstrap_components-1.0.3-py3-none-any.whl (209 kB)
Collecting docker
Downloading docker-5.0.3-py2.py3-none-any.whl (146 kB)
Collecting dash-extensions
Downloading dash_extensions-0.0.71-py3-none-any.whl (1.6 MB)
Collecting xlsxwriter
Downloading XlsxWriter-3.0.3-py3-none-any.whl (149 kB)
Collecting schedule
Downloading schedule-1.1.0-py2.py3-none-any.whl (10 kB)
Collecting plotly>=5.0.0
Downloading plotly-5.6.0-py2.py3-none-any.whl (27.7 MB)
Collecting dash-table==5.0.0
Downloading dash_table-5.0.0-py3-none-any.whl (3.9 kB)
Collecting dash-core-components==2.0.0
Downloading dash_core_components-2.0.0-py3-none-any.whl (3.8 kB)
Collecting flask-compress
Downloading Flask_Compress-1.11-py3-none-any.whl (7.9 kB)
Collecting dash-html-components==2.0.0
Downloading dash_html_components-2.0.0-py3-none-any.whl (4.1 kB)
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
Collecting click>=7.1.2
Downloading click-8.0.4-py3-none-any.whl (97 kB)
Collecting Jinja2>=3.0
Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.1-py3-none-any.whl (15 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting tenacity>=6.2.0
Downloading tenacity-8.0.1-py3-none-any.whl (24 kB)
Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from plotly>=5.0.0->dash->-r requirements.txt (line 3)) (1.16.0)
Collecting jsbeautifier
Downloading jsbeautifier-1.14.0.tar.gz (73 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting Flask-Caching
Downloading Flask_Caching-1.10.1-py3-none-any.whl (34 kB)
Requirement already satisfied: more-itertools in /usr/lib/python3.10/site-packages (from dash-extensions->-r requirements.txt (line 7)) (8.10.0)
Collecting websocket-client>=0.32.0
Downloading websocket_client-1.3.1-py3-none-any.whl (54 kB)
Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/lib/python3.10/site-packages (from docker->-r requirements.txt (line 6)) (2.27.1)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.10/site-packages (from requests!=2.18.0,>=2.14.2->docker->-r requirements.txt (line 6)) (4.0.0)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.10/site-packages (from requests!=2.18.0,>=2.14.2->docker->-r requirements.txt (line 6)) (3.3)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.10/site-packages (from requests!=2.18.0,>=2.14.2->docker->-r requirements.txt (line 6)) (1.26.8)
Collecting python-dateutil>=2.8.1
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.21.0
Downloading numpy-1.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Collecting pytz>=2020.1
Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting deprecated>=1.2.3
Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Requirement already satisfied: packaging>=20.4 in /usr/lib/python3.10/site-packages (from redis->-r requirements.txt (line 2)) (20.9)
Collecting wrapt<2,>=1.10
Downloading wrapt-1.14.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3.10/site-packages (from packaging>=20.4->redis->-r requirements.txt (line 2)) (3.0.1)
Collecting brotli
Downloading Brotli-1.0.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB)
Collecting editorconfig>=0.12.2
Downloading EditorConfig-0.12.3-py3-none-any.whl (16 kB)
Building wheels for collected packages: jsbeautifier
Building wheel for jsbeautifier (PEP 517): started
Building wheel for jsbeautifier (PEP 517): finished with status 'done'
Created wheel for jsbeautifier: filename=jsbeautifier-1.14.0-py3-none-any.whl size=91970 sha256=f6fc74fdb1ad7208734123404ca71ddf303b5e6cb84d7d0ad18398b45f0f0c93
Stored in directory: /tmp/pip-ephem-wheel-cache-7yslx8gl/wheels/41/76/91/43d0eb201fc1adc727a88dbd3e7ab6c77894c453c0abac9bd7
Successfully built jsbeautifier
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, click, tenacity, Flask, brotli, wrapt, plotly, flask-compress, editorconfig, dash-table, dash-html-components, dash-core-components, websocket-client, pytz, python-dateutil, numpy, jsbeautifier, Flask-Caching, deprecated, dash, xlsxwriter, schedule, redis, pandas, docker, dash-extensions, dash-bootstrap-components
Successfully installed Flask-2.0.3 Flask-Caching-1.10.1 Jinja2-3.0.3 MarkupSafe-2.1.0 Werkzeug-2.0.3 brotli-1.0.9 click-8.0.4 dash-2.2.0 dash-bootstrap-components-1.0.3 dash-core-components-2.0.0 dash-extensions-0.0.71 dash-html-components-2.0.0 dash-table-5.0.0 deprecated-1.2.13 docker-5.0.3 editorconfig-0.12.3 flask-compress-1.11 itsdangerous-2.1.1 jsbeautifier-1.14.0 numpy-1.22.3 pandas-1.4.1 plotly-5.6.0 python-dateutil-2.8.2 pytz-2021.3 redis-4.1.4 schedule-1.1.0 tenacity-8.0.1 websocket-client-1.3.1 wrapt-1.14.0 xlsxwriter-3.0.3
Removing intermediate container baa81b5392e2
---> b72b82d79ee3
Step 4/5 : WORKDIR /app
---> Running in afd8defefe90
Removing intermediate container afd8defefe90
---> b234173cf04c
Step 5/5 : CMD chmod a+x entrypoint.sh && ./entrypoint.sh
---> Running in 0da9cf2a4803
Removing intermediate container 0da9cf2a4803
---> 017bfc242a3c
Successfully built 017bfc242a3c
Successfully tagged image_api:latest
[+] Running 4/3
⠿ Network project_default Created 0.1s
⠿ Container container_redis Created 0.1s
⠿ Container container_worker Created 0.1s
⠿ Container container_api Created 0.0s
Attaching to container_api, container_redis, container_worker
container_redis | 1:C 11 Mar 2022 12:46:30.884 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
container_redis | 1:C 11 Mar 2022 12:46:30.884 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
container_redis | 1:C 11 Mar 2022 12:46:30.884 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
container_redis | 1:M 11 Mar 2022 12:46:30.887 * monotonic clock: POSIX clock_gettime
container_redis | 1:M 11 Mar 2022 12:46:30.890 * Running mode=standalone, port=6379.
container_redis | 1:M 11 Mar 2022 12:46:30.890 # Server initialized
container_redis | 1:M 11 Mar 2022 12:46:30.890 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
container_redis | 1:M 11 Mar 2022 12:46:30.891 * Ready to accept connections
container_redis | 1:M 11 Mar 2022 12:46:33.051 * DB saved on disk
container_worker exited with code 0
container_api | Dash is running on http://0.0.0.0:8050/
container_api |
container_api | Dash is running on http://0.0.0.0:8050/
container_api |
container_api | Dash is running on http://0.0.0.0:8050/
container_api |
container_api | * Serving Flask app 'app' (lazy loading)
container_api | * Environment: production
container_api | WARNING: This is a development server. Do not use it in a production deployment.
container_api | Use a production WSGI server instead.
container_api | * Debug mode: on当然,Dockerfiles中的xx.xx是一个真正的ip地址。
谢谢你的帮助。
发布于 2022-09-09 05:44:43
使用pull_policy: never指示复合不应该拉出图像:
worker:
volumes:
- ./api:/app/
- ./worker:/app2/
build:
dockerfile: ./worker/Dockerfile
image: image_worker
pull_policy: never
...相反,它应该依赖于平台缓存的映像。
参考资料:https://docs.docker.com/compose/compose-file/#pull_policy
https://stackoverflow.com/questions/71435415
复制相似问题