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

No support for lambda with docker images #72

Open
jmrodriguez-lab opened this issue Jul 18, 2022 · 4 comments
Open

No support for lambda with docker images #72

jmrodriguez-lab opened this issue Jul 18, 2022 · 4 comments

Comments

@jmrodriguez-lab
Copy link

Deploying lambdas using docker images instead of layers is possible with serverless as explained here. An example:

provider:
  name: aws
  runtime: python3.8
  stage: dev
  region: us-west-1
  ecr:
    images:
        python_lambda:
        path: ./
...

however, this requires docker command to be available in docker image specified in the Dockerfile, which is not installed.

Could it be added, please? :-)

@ghost
Copy link

ghost commented Oct 11, 2022

I had this same issue as well but ended up not using this github-action. Try installing serverless manually and running the deploy command and that worked for me.

@arshamg
Copy link

arshamg commented Dec 6, 2022

Did you find any solution to this using Github Actions?
I'm also considering using the CI/CD service from Serverless - any experience there?

@ghost
Copy link

ghost commented Dec 7, 2022

This worked for me:

on:
  push:
    branches: [ "staging", "main" ]
jobs:     
  <job_name_here>:
    runs-on: ubuntu-latest
    env:
      SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
    steps:
    - uses: actions/checkout@v3
    - name: install-python
      uses: actions/setup-python@v4
      with:
        python-version: '3.8'
    - name: install serverless
      run: npm i -g serverless
    - name: severless deploy
      run: sls deploy --verbose --force

@schammah
Copy link

schammah commented Feb 18, 2024

would love for the action to support that as well,

looks like this forks resolved it by adding the docker installation, merging the code would add this support and fix this issue - take a look here

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

3 participants