我试图让circleci在本地运行,以了解为什么测试用例失败,但我不断遇到以下错误Error starting container <container>: Error response from daemon: invalid UTS mode: container....
我在多个continers上得到这个错误,比如elasticsearch:5.4.3和postgres
我在执行命令circleci local execute build
版本:
- CircleCi版本:0.1.23845+ f59 d90 e(release)
- Docker版本23.0.1,构建版本a5 ee 5 b1
- docker-compose版本1.29.2
- Ubuntu 20.04
我的config.yml文件
version: 2
jobs:
build:
docker:
- image: 722c/circle-ci-ubuntu-python-3:18.04-Node-10
environment:
- DJANGO_SETTINGS_MODULE=config.settings.testing
- DATABASE_URL=postgres://saleor:saleor@db/saleor
- DJANGO_DEFAULT_FROM_EMAIL=noreply@example.com
- BOOK_SERVER_URL="test"
- BOOK_SERVER_TOKEN="test"
- image: postgres
name: db
environment:
- POSTGRES_USER=saleor
- POSTGRES_PASSWORD=saleor
- image: elasticsearch:5.4.3
name: search
environment:
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
working_directory: /app
steps:
- checkout
# Dependencies
# This would typically go in either a build or a build-and-test job when using workflows
# Restore the dependency cache
- restore_cache:
- run:
name: Git submodules Sync
command: git submodule sync
- run:
name: Git submodules update
command: git submodule update --init
- run:
name: Install Python dependencies
command: pip3 install -r requirements.txt
- run:
name: Install Node dependencies
command: npm install
# Save dependency cache
- save_cache:
key: v2-dep-{{ .Branch }}-{{ epoch }}
paths:
- ./node_modules
- /root/.cache
- run:
name: Build the related files
command: npm run build-emails && npm run build-assets --production
- run:
name: Run tests
command: pytest
我在config. yml中缺少了什么吗?我仍然是失败的新与 Docker 和circleci
错误的确切含义是什么,UTS模式是什么,它是如何无效的。
我已经检查了UTS命名空间在我的内核中启用。
任何想法或建议将不胜感激。
1条答案
按热度按时间2izufjch1#
我也遇到了同样的问题,无法解决。您可能需要更新图像以使用circleci新图像。例如cimg/postgres:15.2,然后再次旋转它,看看它是否会有所不同。