Using Docker to make war file to attach to Apache Tomcat.
Struggling to use NPM/MVN to get Tomcat war up.
I'm behind a corporate proxy and the make scripts don't have "bower install --allow-root" (Realized upon looking up).
As we all know, Docker runs everything as root so I've been getting below errors.
[echo] --- BOWER INSTALL --- [exec] [exec] /usr/local/lib/node_modules/bower/lib/node_modules/bower-config/lib/util/rc.js:71 [exec] throw error; [exec] ^ [exec] Error: Unable to parse /root/.bowerrc: Unexpected token } [exec] at parse (/usr/local/lib/node_modules/bower/lib/node_modules/bower-config/lib/util/rc.js:64:21) [exec] at json (/usr/local/lib/node_modules/bower/lib/node_modules/bower-config/lib/util/rc.js:86:16) [exec] at rc (/usr/local/lib/node_modules/bower/lib/node_modules/bower-config/lib/util/rc.js:32:26) [exec] at Config.load (/usr/local/lib/node_modules/bower/lib/node_modules/bower-config/lib/Config.js:16:20) [exec] at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:15:39) [exec] at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12) [exec] at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32) [exec] at Module._compile (module.js:456:26) [exec] at Object.Module._extensions..js (module.js:474:10) [exec] at Module.load (module.js:356:32) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:30.433s [INFO] Finished at: Thu Feb 04 16:15:59 UTC 2016 [INFO] Final Memory: 13M/1928M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.5:run (exec-gen-sources) on project gui-uxd-container: An Ant BuildException has occured: exec returned: 8 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException The command '/bin/sh -c cd /var/opt/gui/gui-uxd-container && sudo mvn clean install' returned a non-zero code: 1 root@docker:~/war-Docker/gui# Since I can't touch the source code, I made leeway through "COPY .bowerrc /root/.bowerrc" inside Dockerfile before invoking the command.
Does the syntax of my .bowerrc seem fine and if so, is this the main complaint my error message is throwing out? I don't want to change the default project folder
{ "proxy":"http://proxy.wsa.com:8000", "https-proxy":"http://proxy.wsa.com:8000", "strict-ssl": false, "allow_root": true } Help appreciated.