Update Dockerfile to make self contained image

• Don't include vim swap files
 • Remove unused path from path environment variable
 • Add npm build script to just build assets
 • Have default command be running the deck
master
Buddy Sandidge 10 years ago
parent 1e24bfd78b
commit c03c64c3a2

@ -1,2 +1,3 @@
scripts/*
node_modules/*
./scripts
*.swp
./node_modules

@ -55,16 +55,19 @@ RUN mkdir -p /opt/node && \
RUN cd /usr/local/bin/ && ln -s phantomjs-1.9.8 phantomjs
ENV PATH /opt/node/bin:/opt/phantom-talk/node_modules/.bin:$PATH
ENV PATH /opt/node/bin:$PATH
ENV PHANTOMJS_BIN /usr/local/bin/phantomjs
# Mount this in the docker container
VOLUME ["/opt/phantom-talk"]
WORKDIR /opt/phantom-talk
COPY package.json /opt/phantom-talk/package.json
COPY README.md /opt/phantom-talk/README.md
COPY ./package.json /opt/phantom-talk/package.json
COPY ./README.md /opt/phantom-talk/README.md
RUN ["npm", "install"]
ADD . /opt/phantom-talk
RUN ["npm", "run", "build"]
EXPOSE 8000
EXPOSE 8001
EXPOSE 35729
ENTRYPOINT ["npm"]
CMD ["run", "deck"]

@ -155,7 +155,8 @@ module.exports = function (grunt) {
grunt.registerTask('dev', ['default']);
grunt.registerTask('style', ['compass', 'clean:compass', 'clean:tmp']);
grunt.registerTask('js', ['handlebars', 'copy', 'requirejs', 'test']);
grunt.registerTask('build', ['clean:app', 'style', 'js', 'watch']);
grunt.registerTask('build', ['static', 'watch']);
grunt.registerTask('static', ['clean:app', 'style', 'js']);
grunt.registerTask('default', ['run-deck', 'karma:server', 'build']);
};

@ -5,6 +5,7 @@
"main": "lib/deck.js",
"scripts": {
"dev": "grunt dev",
"build": "grunt static",
"deck": "./bin/deck",
"test": "grunt test"
},

Loading…
Cancel
Save