I am trying to upload my Python project to an AWS account via circleci CI/CD
but when I deploy the code it always stops and remove docker "docker run --rm -v" in logs
I'm using ORBs like
aws-cli: circleci/aws-cli@3.1.3
serverless-framework: circleci/serverless-framework@2.0.0
any help?
this is .circleci/config.yml
version: 2.1
orbs:
aws-cli: circleci/aws-cli@3.1.3
serverless-framework: circleci/serverless-framework@2.0.0
jobs:
deploy:
executor: serverless-framework/default
docker: # run the steps with Docker
- image: cimg/python:3.8.0
steps:
- checkout
- aws-cli/setup
- serverless-framework/setup
- run:
name: Install plugins
command: |
serverless plugin install -n serverless-python-requirements
- run: python --version
- run:
name: deploy
command: |
sls deploy --stage dev --verbose
sls doctor
workflows:
deploy:
jobs:
- deploy
And serverless.yml file is
service: myapp-api
frameworkVersion: "3"
package:
patterns:
- '!node_modules/**'
- '!.vscode'
- '!.circleci'
- '!temp.txt'
- '!README.md'
- '!env/**'
- '!package.json'
- '!package-lock.json'
- '!others/*.yml'
- '!resources'
provider:
name: aws
stage: dev
endpointType: REGIONAL
runtime: python3.8
region: us-east-2
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: true
slim: true
zip: true
functions:
# others & publics
- ${file(./others/TestGet.yml)}
- ${file(./others/DownloadFactsPost.yml)}
- ${file(./others/DownloadTagsPost.yml)}
resources:
# api gateway
- ${file(./resources/api-gateway-request-validator.yml)}
this is the provided error log
Running "serverless" from node_modules
Deploying myapp-api to stage dev (*********)
Adding Python requirements helper
Generated requirements from /home/circleci/project/requirements.txt in /home/circleci/project/.serverless/requirements.txt
Installing requirements from "/home/circleci/.cache/serverless-python-requirements/6b1b8e5bcb3893228e019bffa40e9c7db43bac76b8b7f2766f061ca751e722ce_x86_64_slspyc/requirements.txt"
Docker Image: public.ecr.aws/sam/build-python3.8:latest-x86_64
Using download cache directory /home/circleci/.cache/serverless-python-requirements/downloadCacheslspyc
Running docker run --rm -v /home/circleci/.cache/serverless-python-requirements/6b1b8e5bcb3893228e019bffa40e9c7db43bac76b8b7f2766f061ca751e722ce_x86_64_slspyc\:/var/task\:z -v /home/circleci/.cache/serverless-python-requirements/downloadCacheslspyc\:/var/useDownloadCache\:z public.ecr.aws/sam/build-python3.8\:latest-x86_64 /bin/sh -c 'chown -R 0\\:0 /var/useDownloadCache && python3.8 -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 3434\\:3434 /var/task && chown -R 3434\\:3434 /var/useDownloadCache && find /var/task -name \\*.so -exec strip \\{\\} \\;'...
× Stack myapp-api-dev failed to deploy (0s)
Environment: linux, node 16.16.0, framework 3.25.1 (local) 3.25.1v (global), plugin 6.2.2, SDK 4.3.2
Credentials: Local, environment variables
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Running "docker run --rm -v /home/circleci/.cache/serverless-python-requirements/6b1b8e5bcb3893228e019bffa40e9c7db43bac76b8b7f2766f061ca751e722ce_x86_64_slspyc:/var/task:z -v /home/circleci/.cache/serverless-python-requirements/downloadCacheslspyc:/var/useDownloadCache:z public.ecr.aws/sam/build-python3.8:latest-x86_64 /bin/sh -c chown -R 0\:0 /var/useDownloadCache && python3.8 -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 3434\:3434 /var/task && chown -R 3434\:3434 /var/useDownloadCache && find /var/task -name \*.so -exec strip \{\} \;" failed with: "docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'."
Exited with code exit status 1