我正在尝试转换我的 docker-compose.yml 文件,该文件可以很好地使用 kubectl 在 minikube 中运行它。
我已经安装了 minikube、kubectl 和 kompose,当我尝试运行时出现以下错误:
C:\Users\test\Downloads\get-string-master\get-string-master> .\kompose-windows-amd64.exe -f .\docker-compose.yml up
INFO Build key detected. Attempting to build and push image 'mainapp'
INFO Building image 'mainapp' from directory 'mainapp'
FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service mainapp: open \tmp\kompose-image-build-399841535: The system cannot find the path specified.
这是我的码头工人撰写文件:
version: '3'
services:
mainapp:
container_name: mainapp
restart: always
build: ./mainapp
image: mainapp
ports:
- "8000:8000"
command: gunicorn -c gunicorn.ini mainapp.application:app
reverseapp:
container_name: reverseapp
restart: always
build: ./reverseapp
image: reverseapp
ports:
- "8001:8001"
depends_on:
- mainapp
command: gunicorn -c gunicorn.ini reverseapp.application:app
nginx:
container_name: nginx
restart: always
build: ./nginx
image: nginx1
ports:
- "80:80"
depends_on:
- reverseapp