Closed Aurel-Roci closed 7 years ago
@swathi-ssunder java installation doesn't seem that straight forward, here might be some advice: http://stackoverflow.com/questions/36608753/install-java-successfully-using-the-dockerfile-however-its-says-java-command-not http://www.massimochericoni.com/2015/02/27/how-to-run-a-java-program-in-a-docker-container/
@jonas-he - Yes, I already went through the links. Trying it on my local docker. But couldn't get it working yet.
hmm. Interesting! And I was told life was easy 😆
Hey guys, you can also include the prediction package in your npm dependencies now,
Just add the following name dependency predict-pokemon
@sacdallago - This is the Dockerfile I tried(to include java).
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
#RUN apt-get -qq update
#RUN apt-get install -y -q python-software-properties software-properties-common
#RUN add-apt-repository ppa:webupd8team/java
#RUN apt-get update
RUN apt-get install -y default-jre
RUN apt-get install -y default-jdk
#RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
#RUN apt-get install oracle-java8-installer -y
#RUN apt-get install oracle-java8-set-default
RUN apt-get install -y nodejs
RUN apt-get install -y npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install -g grunt-cli
RUN npm install
# Bundle app source
COPY . /usr/src/app
RUN grunt apidoc
EXPOSE 8080 3322
CMD ["npm", "start"]
And there are errors.
pokemongo-api@0.0.1 start /usr/src/app
NODE_ENV=production node app.js
/usr/src/app/app/services/logger.js:4
let log = function(type, message, description) {
SyntaxError: Unexpected strict mode reserved word
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/src/app/constants.js:10:17)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
I found that this could be due to the change in the first line from FROM node:4.0
to FROM ubuntu:14.04
. However, neither of them work.
Any pointers ?
@swathi-ssunder i guess the version of node in the repository you installed from is so old that it doesnt support strict mode. I will look into this.
created PR, lets see if it works
build was successful 👍
Hi guys,
the package that will be created needs java to run. Can you add java to the docker container. Look at this issue https://github.com/PokemonGoers/PredictPokemon-2/issues/60#issuecomment-253163369
Thanks