Skip to content

Instantly share code, notes, and snippets.

@eed3si9n
Last active April 27, 2017 16:35
Show Gist options
  • Save eed3si9n/5d80ea9d6e1f6f59ff80231cb2ecab46 to your computer and use it in GitHub Desktop.
Save eed3si9n/5d80ea9d6e1f6f59ff80231cb2ecab46 to your computer and use it in GitHub Desktop.
Testing offline installation using Docker
$ pwd
/tmp/dockertest
$ curl -L "https://github.com/sbt/sbt/releases/download/v0.13.15/sbt-0.13.15.tgz" > sbt-0.13.15.tgz
$ tar zxvf sbt-0.13.15.tgz
....
$ docker run -it -v /tmp/dockertest/sbt:/opt/sbt java:openjdk-9 bash
# ([[ ! -d $JAVA_HOME/conf ]] && ln -s $JAVA_HOME/lib $JAVA_HOME/conf)
# apt-get update && apt-get install -y rsync
....
(turn wifi off)
....
# curl google.com
curl: (6) Could not resolve host: google.com
# /opt/sbt/bin/sbt
Copying runtime jar.
Getting org.scala-sbt sbt 0.13.15 (this may take some time)...
downloading file:////root/.sbt/preloaded/org.scala-sbt/sbt/0.13.15/jars/sbt.jar ...
[SUCCESSFUL ] org.scala-sbt#sbt;0.13.15!sbt.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-lang/scala-library/2.10.6/jars/scala-library.jar ...
[SUCCESSFUL ] org.scala-lang#scala-library;2.10.6!scala-library.jar (42ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/main/0.13.15/jars/main.jar ...
[SUCCESSFUL ] org.scala-sbt#main;0.13.15!main.jar (20ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/compiler-interface/0.13.15/jars/compiler-interface.jar ...
[SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.15!compiler-interface.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/actions/0.13.15/jars/actions.jar ...
[SUCCESSFUL ] org.scala-sbt#actions;0.13.15!actions.jar (6ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/main-settings/0.13.15/jars/main-settings.jar ...
[SUCCESSFUL ] org.scala-sbt#main-settings;0.13.15!main-settings.jar (5ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/interface/0.13.15/jars/interface.jar ...
[SUCCESSFUL ] org.scala-sbt#interface;0.13.15!interface.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/io/0.13.15/jars/io.jar ...
[SUCCESSFUL ] org.scala-sbt#io;0.13.15!io.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/ivy/0.13.15/jars/ivy.jar ...
[SUCCESSFUL ] org.scala-sbt#ivy;0.13.15!ivy.jar (12ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/logging/0.13.15/jars/logging.jar ...
[SUCCESSFUL ] org.scala-sbt#logging;0.13.15!logging.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/logic/0.13.15/jars/logic.jar ...
[SUCCESSFUL ] org.scala-sbt#logic;0.13.15!logic.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/process/0.13.15/jars/process.jar ...
[SUCCESSFUL ] org.scala-sbt#process;0.13.15!process.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/run/0.13.15/jars/run.jar ...
[SUCCESSFUL ] org.scala-sbt#run;0.13.15!run.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/command/0.13.15/jars/command.jar ...
[SUCCESSFUL ] org.scala-sbt#command;0.13.15!command.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/launcher-interface/1.0.1/jars/launcher-interface.jar ...
[SUCCESSFUL ] org.scala-sbt#launcher-interface;1.0.1!launcher-interface.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/classpath/0.13.15/jars/classpath.jar ...
[SUCCESSFUL ] org.scala-sbt#classpath;0.13.15!classpath.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/completion/0.13.15/jars/completion.jar ...
[SUCCESSFUL ] org.scala-sbt#completion;0.13.15!completion.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/api/0.13.15/jars/api.jar ...
[SUCCESSFUL ] org.scala-sbt#api;0.13.15!api.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/compiler-integration/0.13.15/jars/compiler-integration.jar ...
[SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.15!compiler-integration.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/compiler-ivy-integration/0.13.15/jars/compiler-ivy-integration.jar ...
[SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.15!compiler-ivy-integration.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/relation/0.13.15/jars/relation.jar ...
[SUCCESSFUL ] org.scala-sbt#relation;0.13.15!relation.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/task-system/0.13.15/jars/task-system.jar ...
[SUCCESSFUL ] org.scala-sbt#task-system;0.13.15!task-system.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/tasks/0.13.15/jars/tasks.jar ...
[SUCCESSFUL ] org.scala-sbt#tasks;0.13.15!tasks.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/tracking/0.13.15/jars/tracking.jar ...
[SUCCESSFUL ] org.scala-sbt#tracking;0.13.15!tracking.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/testing/0.13.15/jars/testing.jar ...
[SUCCESSFUL ] org.scala-sbt#testing;0.13.15!testing.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-lang/scala-compiler/2.10.6/jars/scala-compiler.jar ...
[SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.6!scala-compiler.jar (82ms)
downloading file:////root/.sbt/preloaded/org.scala-lang/scala-reflect/2.10.6/jars/scala-reflect.jar ...
[SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.6!scala-reflect.jar (19ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/control/0.13.15/jars/control.jar ...
[SUCCESSFUL ] org.scala-sbt#control;0.13.15!control.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/collections/0.13.15/jars/collections.jar ...
[SUCCESSFUL ] org.scala-sbt#collections;0.13.15!collections.jar (3ms)
downloading file:////root/.sbt/preloaded/jline/jline/2.14.3/jars/jline.jar ...
[SUCCESSFUL ] jline#jline;2.14.3!jline.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/classfile/0.13.15/jars/classfile.jar ...
[SUCCESSFUL ] org.scala-sbt#classfile;0.13.15!classfile.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/incremental-compiler/0.13.15/jars/incremental-compiler.jar ...
[SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.15!incremental-compiler.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/compile/0.13.15/jars/compile.jar ...
[SUCCESSFUL ] org.scala-sbt#compile;0.13.15!compile.jar (6ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/persist/0.13.15/jars/persist.jar ...
[SUCCESSFUL ] org.scala-sbt#persist;0.13.15!persist.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...
[SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/cross/0.13.15/jars/cross.jar ...
[SUCCESSFUL ] org.scala-sbt#cross;0.13.15!cross.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt.ivy/ivy/2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4/jars/ivy.jar ...
[SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-48dd0744422128446aee9ac31aa356ee203cc9f4!ivy.jar (8ms)
downloading file:////root/.sbt/preloaded/com.jcraft/jsch/0.1.50/jars/jsch.jar ...
[SUCCESSFUL ] com.jcraft#jsch;0.1.50!jsch.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/serialization_2.10/0.1.2/jars/serialization_2.10.jar ...
[SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.2!serialization_2.10.jar (4ms)
downloading file:////root/.sbt/preloaded/org.scala-lang.modules/scala-pickling_2.10/0.10.1/jars/scala-pickling_2.10.jar ...
[SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.1!scala-pickling_2.10.jar (7ms)
downloading file:////root/.sbt/preloaded/org.json4s/json4s-core_2.10/3.2.10/jars/json4s-core_2.10.jar ...
[SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (5ms)
downloading file:////root/.sbt/preloaded/org.spire-math/jawn-parser_2.10/0.6.0/jars/jawn-parser_2.10.jar ...
[SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (2ms)
downloading file:////root/.sbt/preloaded/org.spire-math/json4s-support_2.10/0.6.0/jars/json4s-support_2.10.jar ...
[SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scalamacros/quasiquotes_2.10/2.0.1/jars/quasiquotes_2.10.jar ...
[SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.1!quasiquotes_2.10.jar (6ms)
downloading file:////root/.sbt/preloaded/org.json4s/json4s-ast_2.10/3.2.10/jars/json4s-ast_2.10.jar ...
[SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (2ms)
downloading file:////root/.sbt/preloaded/com.thoughtworks.paranamer/paranamer/2.6/jars/paranamer.jar ...
[SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/cache/0.13.15/jars/cache.jar ...
[SUCCESSFUL ] org.scala-sbt#cache;0.13.15!cache.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/test-agent/0.13.15/jars/test-agent.jar ...
[SUCCESSFUL ] org.scala-sbt#test-agent;0.13.15!test-agent.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/test-interface/1.0/jars/test-interface.jar ...
[SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (2ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/apply-macro/0.13.15/jars/apply-macro.jar ...
[SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.15!apply-macro.jar (3ms)
downloading file:////root/.sbt/preloaded/org.scala-sbt/template-resolver/0.1/jars/template-resolver.jar ...
[SUCCESSFUL ] org.scala-sbt#template-resolver;0.1!template-resolver.jar (2ms)
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
49 artifacts copied, 0 already retrieved (17577kB/59ms)
Getting Scala 2.10.6 (for sbt)...
downloading file:////root/.sbt/preloaded/org.scala-lang/jline/2.10.6/jars/jline.jar ...
[SUCCESSFUL ] org.scala-lang#jline;2.10.6!jline.jar (4ms)
downloading file:////root/.sbt/preloaded/org.fusesource.jansi/jansi/1.4/jars/jansi.jar ...
[SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (3ms)
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24494kB/48ms)
WARN: No sbt.version set in project/build.properties, base directory: /
[info] Set current project to root (in build file:/)
> scalaVersion
[info] 2.10.6
> console
[info] Updating {file:/}root...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] 'compiler-interface' not yet compiled for Scala 2.10.6. Compiling...
[info] Compilation completed in 6.169 s
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.6 (OpenJDK 64-Bit Server VM, Java 9-Debian).
Type in expressions to have them evaluated.
Type :help for more information.
scala> 1 + 1
res0: Int = 2
scala> exit
warning: there were 1 deprecation warning(s); re-run with -deprecation for details
Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[success] Total time: 13 s, completed Apr 11, 2017, 1:58:14 AM
> exit
@LogicalTime
Copy link

LogicalTime commented Apr 11, 2017

I am running it from the just decompressing the zip file on windows. I have sbt on my path. The ~/.sbt/ file is generated but no preloaded directory is put there. Here is the full error.

C:\Users\Mark\mvb\code\hello>sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0
Getting org.fusesource.jansi jansi 1.11 ...
You probably access the destination server through a proxy server that is not we
ll configured.
You probably access the destination server through a proxy server that is not we
ll configured.
You probably access the destination server through a proxy server that is not we
ll configured.
You probably access the destination server through a proxy server that is not we
ll configured.

:: problems summary ::
:::: WARNINGS
        Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/f
usesource/jansi/jansi/1.11/jansi-1.11.pom

        Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/f
usesource/jansi/jansi/1.11/jansi-1.11.jar

        Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe
/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml

        Host repo.scala-sbt.org not found. url=https://repo.scala-sbt.org/scalas
bt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml

                module not found: org.fusesource.jansi#jansi;1.11

        ==== local: tried

          C:\Users\Mark\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml


          -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:

          C:\Users\Mark\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.j
ar

        ==== Maven Central: tried

          https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1
.11.pom

          -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:

          https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1
.11.jar

        ==== typesafe-ivy-releases: tried

          https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/j
ansi/1.11/ivys/ivy.xml

        ==== sbt-ivy-snapshots: tried

          https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi
/jansi/1.11/ivys/ivy.xml

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.fusesource.jansi#jansi;1.11: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.fusesource.jansi#jansi;1.11: not found
Error during sbt execution: Error retrieving required libraries
  (see C:\Users\Mark\.sbt\boot\update.log for complete log)
Error: Could not retrieve jansi 1.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment