modernWebDevGenerator icon indicating copy to clipboard operation
modernWebDevGenerator copied to clipboard

Add Docker support

Open dsebastien opened this issue 10 years ago • 2 comments

dsebastien avatar Oct 27 '15 23:10 dsebastien

What support would be needed for docker? would you want to create a docker image that doesnt use yeoman but a dockerfile? I would like to help you with this issue.

zachjamesgreen avatar Jan 10 '16 23:01 zachjamesgreen

Hello @zachjamesgreen

I wanted to include a way to quickly be able to create a Docker image from:

  • the dev version (i.e., w/ sourcemaps, etc)
  • the production version

I actually implementing something in an older project, but it needs some reviewing and improvements I think. Here's what I had that we could take inspiration from:

  • https://github.com/dsebastien/midnightLightV2/blob/master/Dockerfile
  • https://github.com/dsebastien/midnightLightV2/blob/master/DockerfileDev
  • https://github.com/dsebastien/midnightLightV2/blob/master/runDevOnDocker.sh
  • https://github.com/dsebastien/midnightLightV2/blob/master/runOnDocker.sh
  • https://github.com/dsebastien/modernWebDevGenerator/blob/master/app/templates/projectFiles/.dockerignore

Some issues there:

  • dockerfiles
    • we should probably enforce a specific nodejs version to avoid surprises
    • the list of globally installed packages in the image could be shorter
    • the TypeScript version should be retrieved from tsconfig.json
    • the run commands should reuse scripts defined in package.json
    • the CMD command should be "npm" "start" rather than "gulp" "serve"
    • needs some documentation
  • the shell scripts that create the images were made on Windows, that might not necessarily work on *nix / OSX

Any further ideas are welcome :)

dsebastien avatar Jan 11 '16 05:01 dsebastien