I have cloned AWS Code Build REPO.
when I try to build
=> ERROR [runtimes_n_corretto 4/6] RUN sbt version -Dsbt.rootdir=true 14.6s
------
> [runtimes_n_corretto 4/6] RUN sbt version -Dsbt.rootdir=true:
0.578 copying runtime jar...
5.095 [info] [launcher] getting org.scala-sbt sbt 1.6.2 (this may take some time)...
10.28 [info] [launcher] getting Scala 2.12.15 (for sbt)...
11.28 [info] Updated file /project/build.properties: set sbt.version to 1.6.2
11.29 [info] welcome to sbt 1.6.2 (Amazon.com Inc. Java 11.0.20.1)
12.42 [info] loading project definition from /project
14.01 [info] set current project to root (in build file:/)
14.02 java.io.IOException: User limit of inotify instances reached or too many open files
....
Dockerfile:414
--------------------
412 |
413 | ENV PATH "/usr/local/bin/sbt/bin:$PATH"
414 | >>> RUN sbt version -Dsbt.rootdir=true
415 | # Cleanup
416 | RUN rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \
--------------------
ERROR: failed to solve: process "/bin/sh -c sbt version -Dsbt.rootdir=true" did not complete successfully: exit code: 1
sbt lines in Dockerfile
ENV PATH "/usr/local/bin/sbt/bin:$PATH"
RUN sbt version -Dsbt.rootdir=true
sbt version
shows
[warn] No sbt.version set in project/build.properties, base directory: /home/miki/aws-codebuild-docker-images/ubuntu/standard/5.0
[info] welcome to sbt 1.9.4 (Ubuntu Java 11.0.20)
[info] set current project to root-5-0 (in build file:/home/miki/aws-codebuild-docker-images/ubuntu/standard/5.0/
[info] 0.1.0-SNAPSHOT
How to fix this?
I solved this using:
echo 256 | sudo tee /proc/sys/fs/inotify/max_user_instances