The Docker « /jhipster » folder is shared to the local « ~/jhipster » folder

Forward all ports exposed by docker (8080 for Tomcat, 3000 for BrowserSync from the « grunt serve » task, 3001 for the BrowserSync UI, and 22 for SSHD). In the following example we forward the container 22 port to the host 4022 port, to prevent some port conflicts:

SSH configuration

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.

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.

Step 1 – Check for existing SSH keys.

ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
Check the directory listing to see if you already have a public SSH key. By default, the filenames of the public keys are one of the following:

id_dsa.pub
id_ecdsa.pub
id_ed25519.pub
id_rsa.pub

If you see an existing public and private key pair listed (for example id_rsa.pub and id_rsa) that you would like to use to connect to GitHub, you can skip Step 2 and go straight to Step 3.

4 – Create a local repository
Create a folder in your system. This will serve as a local repository which will later be pushed onto the GitHub website.
Use the following command: git init devops_pm_rep

Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master

Check out your fork’s local master branch

$ git checkout master
# Switched to branch 'master'

Merge the changes from upstream/master into your local master branch. This brings your fork’s master branch into sync with the upstream repository, without losing your local changes.$ git merge upstream/master

Syncing your fork only updates your local copy of the repository. To update your fork on GitHub, you must push your changes.

Pushing to a remote

Use git push to push your local branch to a remote repository.

The git push command takes two arguments:

A remote name, for example, origin
A branch name, for example, master

For example:

git push

As an example, you usually run git push origin master to push your local changes to your online repository.