Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

Increase watchers in GitHub Workflow when running from a docker image

Solved! Go to Solution.

I'm currently running a  job in my workflow using my custom docker image which has all the environment setup. 

 

On the step of Expo Deploy i'm running into this error `Error: ENOSPC: System limit for number of file watchers reached`. I can't increase the watchers in my docker image as it is only available in read-only mode if not ran with privileges. 

 

The job in my workflow

 

 

expo-publish:
    name: Expo Publish
    needs: test
    runs-on: ubuntu-latest
    container: 
      image: bluebasejs/github-actions-image
      
    strategy:
      matrix:
        node-version: [12]

    steps:
      - uses: actions/checkout@v1
- name: Install Dependencies env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: yarn install - name: Build Expo run: HOME=/root bluebase expo:build - name: Expo Deploy uses: BlueBaseJS/expo-deploy-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXPO_CLI_USERNAME: ${{ secrets.EXPO_CLI_USERNAME }} EXPO_CLI_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}

 

Adding  this step to the job 

 

- run: fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p

 

results in the error 

sysctl: setting key "fs.inotify.max_user_watches": Read-only file system

 

2 Replies
Solution
GitHub Staff
Message 2 of 3

Re: Increase watchers in GitHub Workflow when running from a docker image

This is a [docker limitation](https://github.com/moby/moby/issues/4611), you cannot change sysctl settings by default.

 

You may be able to change the sysctl settings using the `--sysctl ...` option, adding that to the [container options](https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-g...).

Copilot Lvl 2
Message 3 of 3

Re: Increase watchers in GitHub Workflow when running from a docker image

Solved it by adding the --privileged to the options

 


@ethomson wrote:

This is a [docker limitation](https://github.com/moby/moby/issues/4611), you cannot change sysctl settings by default.

 

You may be able to change the sysctl settings using the `--sysctl ...` option, adding that to the [container options](https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-g...).