We provide 2 ways of working with JHipster:
Install Node.js from the Node.js website.
Install Yeoman:
npm install -g yo
Install JHipster:
npm install -g generator-jhipster
To find more information, tips and help, please have a look at the Yeoman "getting starting" guide before submitting a bug.
JHipster has a specific jhipster-docker project, which provides a Docker container.
This project makes a Docker "Trusted build" that is available on:
https://registry.hub.docker.com/u/jdubois/jhipster-docker/
This image will allow you to run JHipster inside Docker.
Install Docker on your machine.
Pull the JHipster Docker image:
sudo docker pull jdubois/jhipster-docker
Create a "jhipster" folder in your home directory:
mkdir ~/jhipster
Run The docker image, with the following options:
sudo docker run -v ~/jhipster:/jhipster -p 8080:8080 -p 9000:9000 -p 4022:22 -t jdubois/jhipster-docker
You can now connect to your docker container with SSH. You can connect as "root/jhipster" or as "jhipster/jhipster", and we recommand you use the "jhipster" user as some of the tool used are not meant to be run by the root user.
Start by adding your SSH public key to the Docker container:
cat .ssh/id_rsa.pub | ssh -p 4022 jhipster@localhost 'mkdir .ssh && cat >> .ssh/authorized_keys'
You can now connect to the Docker container:
ssh -p 4022 jhipster@localhost
You can then go to the /jhipster directory in your container, and start building your app inside Docker:
cd /jhipster
yo jhipster
Once your application is created, you can run all the normal grunt/bower/maven commands, for example:
mvn spring-boot:run
Congratulations! You've launched your JHipster app inside Docker!
On your host machine, you should be able to :
As the generated files are in your shared folder, they will not be deleted if you stop your Docker container. However, if you don't want Docker to keep downloading all the Maven and NPM dependencies every time you start the container, you should commit its state.