ringojs-docker images
build with deb package
FROM java:8
MAINTAINER 1141591465@qq.com
RUN apt-get update && apt-get install -y jsvc
ADD ringojs_1.2.1_all.deb /tmp/ringojs.deb
RUN dpkg -i /tmp/ringojs.deb && rm /tmp/ringojs.deb
CMD ["bash"]
FROM dalongrong/ringojs-docker
WORKDIR /app
COPY app.js /app/
ENTRYPOINT [ "ringo","app.js" ]
app.js
var app = function(request) {
return {
body: ['Hello World'],
headers: {'Content-Type': 'text/html'},
status: 200
}
}
var {Server} = require('ringo/httpserver');
var server = new Server({app: app, port: 8080,host:"0.0.0.0"});
server.start();
- base image
docker-compose -f docker-compose -f docker-compose-base.yaml
docker-compose up -d
open http://localhost:8080