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

Building via docker on GitHub actions? #37

Open
NARKOZ opened this issue Mar 17, 2021 · 3 comments
Open

Building via docker on GitHub actions? #37

NARKOZ opened this issue Mar 17, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@NARKOZ
Copy link

NARKOZ commented Mar 17, 2021

Currently when I try to run sls deploy on github actions it fails with:

Serverless: Zipping the gemfiles and native libs to /home/runner/work/repo/repo/.serverless/ruby_layer/gemLayer.zip
 
 Exception -----------------------------------------------
 
  [OperationalError: EACCES: permission denied, scandir '/home/runner/work/repo/repo/.serverless/ruby_layer/build/ruby/2.7.0/gems/pg-1.2.3/ext/.gem.20210317-1-q5o5ls'] {
    cause: [Error: EACCES: permission denied, scandir '/home/runner/work/repo/repo/.serverless/ruby_layer/build/ruby/2.7.0/gems/pg-1.2.3/ext/.gem.20210317-1-q5o5ls'] {
      errno: -13,
      code: 'EACCES',
      syscall: 'scandir',
      path: '/home/runner/work/repo/repo/.serverless/ruby_layer/build/ruby/2.7.0/gems/pg-1.2.3/ext/.gem.20210317-1-q5o5ls'
    },
    isOperational: true,
    errno: -13,
    code: 'EACCES',
    syscall: 'scandir',
    path: '/home/runner/work/repo/repo/.serverless/ruby_layer/build/ruby/2.7.0/gems/pg-1.2.3/ext/.gem.20210317-1-q5o5ls'
  }

My serverless config contains:

custom:
  rubyLayer:
    use_docker: true
    docker_file: Dockerfile
    native_libs:
      - /usr/lib64/libpq.so.5
      - /usr/lib64/libldap_r-2.4.so.2
      - /usr/lib64/liblber-2.4.so.2
      - /usr/lib64/libsasl2.so.3
      - /usr/lib64/libssl3.so
      - /usr/lib64/libsmime3.so
      - /usr/lib64/libnss3.so
  • OS: ubuntu-latest
  • NodeVersion 15.10.0
  • Ruby version 2.7.1
  • Bundler version 2.2.6
@NARKOZ NARKOZ added the bug Something isn't working label Mar 17, 2021
@navarasu navarasu self-assigned this Mar 22, 2021
@navarasu navarasu added this to the 1.5.0 milestone Mar 22, 2021
@navarasu
Copy link
Owner

navarasu commented Mar 22, 2021

Thanks Nihad for raising the issue.
I will check this issue with simple example from my side. Meanwhile please share your gemfile that you have used.

@NARKOZ
Copy link
Author

NARKOZ commented Mar 23, 2021

Gemfile:

source 'https://rubygems.org'

gem 'pg'
gem 'jwt'
gem 'i18n'
gem 'aws-sdk-ssm'
gem 'aws-sdk-lambda'
gem 'activemodel', '~> 6.1', require: 'active_model'
gem 'activerecord', '~> 6.1', require: 'active_record'
gem 'activesupport', '~> 6.1', require: 'active_support'

@starverdiyev
Copy link

The same error. Was checked on all ubuntu versions on Github actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants