Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker启动报错 #11

Open
ddfeiyu opened this issue Feb 7, 2025 · 2 comments
Open

docker启动报错 #11

ddfeiyu opened this issue Feb 7, 2025 · 2 comments

Comments

@ddfeiyu
Copy link

ddfeiyu commented Feb 7, 2025

机器

macOS Monterey
版本 12.5
MacBook Pro (14英寸,2021年)
芯片 :Apple M1 Pro

报错信息

docker-compose up --build
Building frontend
[+] Building 0.2s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 547B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/arm64v8/node:22 0.1s

[internal] load metadata for docker.io/arm64v8/node:22:


failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests 22]: 403 Forbidden
ERROR: Service 'frontend' failed to build : Build failed

docker-compose.yml

services:
  backend:
    build:
      context: .
      dockerfile: backend/Dockerfile
    container_name: backend
    ports:
      - "8000:8000"
    env_file:
      - backend/.env
    volumes:
      - ./backend:/app
    networks:
      - app-network
    depends_on:
      - frontend

  frontend:
    build:
      context: .
      dockerfile: frontend/Dockerfile
    deploy:
      resources:
        limits:
          memory: 2g
          cpus: '1'
    container_name: frontend
    ports:
      - "5173:5173"
    volumes:
      - ./frontend:/app       # 挂载源代码
      - /app/node_modules     # 防止覆盖容器内的 node_modules
    networks:
      - app-network
    command: ["npm", "run", "dev", "--", "--host"]

networks:
  app-network:
    driver: bridge

@alecm20
Copy link
Owner

alecm20 commented Feb 7, 2025

是不是镜像没有 pull 成功?需要处理网络问题,或者用手动的方式安装依赖运行试试?

@ddfeiyu
Copy link
Author

ddfeiyu commented Feb 7, 2025

是不是镜像没有 pull 成功?需要处理网络问题,或者用手动的方式安装依赖运行试试?

pull成功了,手动安装还要安装conda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants