Conversation
| @@ -0,0 +1,13 @@ | |||
| FROM debian:stretch-slim | |||
There was a problem hiding this comment.
Why not use FROM node? Also there is already a discussion about including node in the moodle-apache-php image
There was a problem hiding this comment.
| FROM debian:stretch-slim | |
| FROM node |
| context: ./ | ||
| dockerfile: node.dockerfile | ||
| volumes: | ||
| - "${MOODLE_DOCKER_WWWROOT}:/var/www/html |
There was a problem hiding this comment.
| - "${MOODLE_DOCKER_WWWROOT}:/var/www/html | |
| - "${MOODLE_DOCKER_WWWROOT}:/var/www/html" |
| FROM debian:stretch-slim | ||
|
|
||
| RUN apt-get update && apt-get install -my gnupg curl | ||
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - |
There was a problem hiding this comment.
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
| RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - |
| nodejs | ||
|
|
||
| RUN /usr/bin/npm install -g grunt-cli | ||
| ADD ./bin/start-grunt.sh . |
There was a problem hiding this comment.
| ADD ./bin/start-grunt.sh . | |
| ADD ./bin/start-grunt.sh . | |
| USER root | |
| RUN chmod 755 ./start-grunt.sh | |
|
Hi, as far as we include The problem I can see with this PR is that it requires us to be sticky to a given node version and that can be tricky. Note I've not tried the idea above, maybe it has other problems, just I'm not sure if adding any extra node container really helps, hence, thinking about potential alternatives. Also, side note: since #242 is possible to have a new Thoughts about the idea (or any other idea related to ease of node/npm use) ? Ciao :-) |
This adds a node container, locked at the necessary core-supported version, for running grunt tasks. The script is based on a Stackoverflow post: https://stackoverflow.com/a/37102013. It's a work-around to ensure that the Moodle web root is loaded before the container runs the command. The expected result (verified locally) is that grunt watch is running and compiling changes. There's probably a more elegant solution to this but I wanted to share what I'd gotten working.