asciinema / asciicast2gif

Generate GIF animations from asciicasts (asciinema recordings)
MIT License
1.21k stars 82 forks source link

docker build fails #60

Closed ahmetb closed 2 years ago

ahmetb commented 5 years ago

I cloned the repo at v0.2.1 and tried to build the dockerfile without any args:

docker build -t foo .
Sending build context to Docker daemon    107kB
Step 1/34 : FROM clojure:alpine
 ---> 6f58f48202c7
Step 2/34 : RUN mkdir /app
 ---> Using cache
 ---> 5d4eb9d7ab9a
Step 3/34 : WORKDIR /app
 ---> Using cache
 ---> 31ec5969d312
Step 4/34 : COPY project.clj /app/
 ---> Using cache
 ---> 58857b24a6b7
Step 5/34 : RUN lein deps
 ---> Using cache
 ---> 089ba6d9409c
Step 6/34 : COPY asciinema-player /app/asciinema-player
 ---> Using cache
 ---> 1d4e97fd0859
Step 7/34 : COPY src /app/src
 ---> Using cache
 ---> fa4b0c1bda1b
Step 8/34 : COPY externs /app/externs
 ---> Using cache
 ---> 74603a2175bd
Step 9/34 : RUN lein cljsbuild once main && lein cljsbuild once page
 ---> Running in 79fea8ce9042
Compiling ClojureScript...
Retrieving cljsbuild/cljsbuild/1.1.7/cljsbuild-1.1.7.pom from clojars
Retrieving org/clojure/clojurescript/0.0-3211/clojurescript-0.0-3211.pom from central
Retrieving org/clojure/clojure/1.7.0-beta1/clojure-1.7.0-beta1.pom from central
Retrieving com/google/javascript/closure-compiler/v20150126/closure-compiler-v20150126.pom from central
Retrieving com/google/javascript/closure-compiler-parent/v20150126/closure-compiler-parent-v20150126.pom from central
Retrieving com/google/javascript/closure-compiler-externs/v20150126/closure-compiler-externs-v20150126.pom from central
Retrieving args4j/args4j/2.0.26/args4j-2.0.26.pom from central
Retrieving args4j/args4j-site/2.0.26/args4j-site-2.0.26.pom from central
Retrieving org/kohsuke/pom/6/pom-6.pom from central
Retrieving com/google/guava/guava/18.0/guava-18.0.pom from central
Retrieving com/google/guava/guava-parent/18.0/guava-parent-18.0.pom from central
Retrieving com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom from central
Retrieving com/google/code/gson/gson/2.2.4/gson-2.2.4.pom from central
Retrieving com/google/truth/truth/0.24/truth-0.24.pom from central
Retrieving com/google/truth/truth-parent/0.24/truth-parent-0.24.pom from central
Retrieving com/google/guava/guava/17.0/guava-17.0.pom from central
Retrieving com/google/guava/guava-parent/17.0/guava-parent-17.0.pom from central
Retrieving junit/junit/4.10/junit-4.10.pom from central
Retrieving org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.pom from central
Retrieving org/hamcrest/hamcrest-parent/1.1/hamcrest-parent-1.1.pom from central
Retrieving org/clojure/google-closure-library/0.0-20140718-946a7d39/google-closure-library-0.0-20140718-946a7d39.pom from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.pom from central
Retrieving org/clojure/tools.reader/0.9.1/tools.reader-0.9.1.pom from central
Retrieving clj-stacktrace/clj-stacktrace/0.2.5/clj-stacktrace-0.2.5.pom from clojars
Retrieving org/clojure/tools.namespace/0.2.11/tools.namespace-0.2.11.pom from central
Retrieving org/clojure/tools.namespace/0.2.11/tools.namespace-0.2.11.jar from central
Retrieving cljsbuild/cljsbuild/1.1.7/cljsbuild-1.1.7.jar from clojars
Retrieving clj-stacktrace/clj-stacktrace/0.2.5/clj-stacktrace-0.2.5.jar from clojars
Compiling ["main.js"] from ["src"]...
Compiling ["main.js"] failed.
clojure.lang.ExceptionInfo: failed compiling file:/app/src/asciinema/gif/main.cljs {:file #object[java.io.File 0x808fa1 "/app/src/asciinema/gif/main.cljs"]}
    at clojure.core$ex_info.invokeStatic(core.clj:4739)
    at clojure.core$ex_info.invoke(core.clj:4739)
    at cljs.compiler$compile_file$fn__3702.invoke(compiler.cljc:1562)
    at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1522)
    at cljs.compiler$compile_file.invoke(compiler.cljc:1498)
    at cljs.closure$compile_file.invokeStatic(closure.clj:573)
    at cljs.closure$compile_file.invoke(closure.clj:564)
    at cljs.closure$fn__5124.invokeStatic(closure.clj:653)
    at cljs.closure$fn__5124.invoke(closure.clj:647)
    at cljs.closure$fn__5052$G__5045__5059.invoke(closure.clj:521)
    at cljs.closure$compile_sources$iter__5250__5254$fn__5255.invoke(closure.clj:1011)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:706)
    at clojure.core$next__5108.invokeStatic(core.clj:64)
    at clojure.core$dorun.invokeStatic(core.clj:3134)
    at clojure.core$doall.invokeStatic(core.clj:3140)
    at clojure.core$doall.invoke(core.clj:3140)
    at cljs.closure$compile_sources.invokeStatic(closure.clj:1007)
    at cljs.closure$compile_sources.invoke(closure.clj:996)
    at cljs.closure$build.invokeStatic(closure.clj:2817)
    at cljs.closure$build.invoke(closure.clj:2718)
    at cljs.build.api$build.invokeStatic(api.clj:208)
    at cljs.build.api$build.invoke(api.clj:189)
    at cljs.build.api$build.invokeStatic(api.clj:195)
    at cljs.build.api$build.invoke(api.clj:189)
    at cljsbuild.compiler$compile_cljs$fn__718.invoke(compiler.clj:61)
    at cljsbuild.compiler$compile_cljs.invokeStatic(compiler.clj:60)
    at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:48)
    at cljsbuild.compiler$run_compiler.invokeStatic(compiler.clj:168)
    at cljsbuild.compiler$run_compiler.invoke(compiler.clj:129)
    at user$eval847$iter__895__899$fn__900$fn__926.invoke(form-init680045584653279170.clj:1)
    at user$eval847$iter__895__899$fn__900.invoke(form-init680045584653279170.clj:1)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$dorun.invokeStatic(core.clj:3125)
    at clojure.core$doall.invokeStatic(core.clj:3140)
    at clojure.core$doall.invoke(core.clj:3140)
    at user$eval847.invokeStatic(form-init680045584653279170.clj:1)
    at user$eval847.invoke(form-init680045584653279170.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:7062)
    at clojure.lang.Compiler.eval(Compiler.java:7052)
    at clojure.lang.Compiler.load(Compiler.java:7514)
    at clojure.lang.Compiler.loadFile(Compiler.java:7452)
    at clojure.main$load_script.invokeStatic(main.clj:278)
    at clojure.main$init_opt.invokeStatic(main.clj:280)
    at clojure.main$init_opt.invoke(main.clj:280)
    at clojure.main$initialize.invokeStatic(main.clj:311)
    at clojure.main$null_opt.invokeStatic(main.clj:345)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.invokeStatic(main.clj:424)
    at clojure.main$main.doInvoke(main.clj:387)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:702)
    at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: No such namespace: asciinema.player.asciicast, could not locate asciinema/player/asciicast.cljs, asciinema/player/asciicast.cljc, or JavaScript source providing "asciinema.player.asciicast" in file /app/src/asciinema/gif/main.cljs {:tag :cljs/analysis-error}
    at clojure.core$ex_info.invokeStatic(core.clj:4739)
    at clojure.core$ex_info.invoke(core.clj:4739)
    at cljs.analyzer$error.invokeStatic(analyzer.cljc:697)
    at cljs.analyzer$error.invoke(analyzer.cljc:693)
    at cljs.analyzer$error.invokeStatic(analyzer.cljc:695)
    at cljs.analyzer$error.invoke(analyzer.cljc:693)
    at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:2129)
    at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:2103)
    at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:3476)
    at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:3471)
    at cljs.analyzer$analyze_STAR_$fn__2510.invoke(analyzer.cljc:3596)
    at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
    at clojure.core$reduce.invokeStatic(core.clj:6747)
    at clojure.core$reduce.invoke(core.clj:6730)
    at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3596)
    at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3586)
    at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3616)
    at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
    at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1386)
    at cljs.compiler$emit_source.invoke(compiler.cljc:1365)
    at cljs.compiler$compile_file_STAR_$fn__3672.invoke(compiler.cljc:1467)
    at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
    at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
    at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1451)
    at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1444)
    at cljs.compiler$compile_file$fn__3702.invoke(compiler.cljc:1547)
    ... 55 more
Subprocess failed
The command '/bin/sh -c lein cljsbuild once main && lein cljsbuild once page' returned a non-zero code: 1
yangyang5214 commented 3 years ago

You need update git submodule

cd asciicast2gif

# for asciinema-player 
git submodule init
git submodule update

cd asciinema-player 

# for vt
git submodule init
git submodule update

# then cd .. && run  success
docker build xxxx 

@ahmetb 😄

jmaitrehenry commented 3 years ago

Same issue and the fix provided by @yangyang5214 works! @sickill do you want to close this issue?