BrandonE/lichocker

Error getting MongoDB repository during build

arimourao opened this issue · 2 comments

When trying to build the docker image, the following occurs:

W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927

the apt hints:
E: There were unauthenticated packages and -y was used without --allow-unauthenticated

also worth of notice:

debconf: delaying package configuration, since apt-utils is not installed

I will try to address these issues and submit a PR soon

Hey @arimourao! Thanks for reporting this. I actually noticed this last month fixed it in this branch. Additionally, this branch:

  • Upgrades the Ubuntu image from 14.04 to 18.04.
  • Runs as few commands as root as possible, which also means less of the filesystem is owned by root.
  • Removes the use of | sh (this is kind of a self-command injection attack waiting to happen).
  • Hardcodes the PGP signatures.
  • Attempts to auto-start Lichess on run.

Unfortunately, after getting all of this working, I would consistently get this error which I've experienced in the past:

[trace] Stack trace suppressed: run last quote/compile:compileIncremental for the full output.
[trace] Stack trace suppressed: run last common/compile:compileIncremental for the full output.
[error] (quote/compile:compileIncremental) sbt.InvalidScalaInstance: Scala instance doesn't exist or is invalid:
[error]     version 2.11.12, library jar: /home/lichess/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.12.jar, compiler jar: /home/lichess/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.12.jar
[error] (common/compile:compileIncremental) sbt.InvalidScalaInstance: Scala instance doesn't exist or is invalid:
[error]     version 2.11.12, library jar: /home/lichess/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.12.jar, compiler jar: /home/lichess/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.12.jar
[error] Total time: 32 s, completed Oct 11, 2019 7:30:34 AM

If you'd like to investigate into that issue, I'd happily include your fix into that branch and then merge to master. You can follow this discussion on the #development room of the Lichess Discord. @0az, who is working on a similar initiative, mentioned this potentially relevant factoid:

the actual sbt package is a wrapper script
not sbt itself
you have to get sbt manually

@greg-finley-ck and I made a major update to Lichocker that appears to fix all of the issues we've been experiencing recently with the old version. Please try the latest Docker image on Docker Hub and re-open this if you have the same issue.