Build from source on Windows machine using docker

Mathias6 years ago

Hello,

I just wanted to lend some help to those that want to build from your source but are stuck with a windows machine.

  1. install docker and get it up and running (google it)

  2. get docker image of ubuntu machine with java and maven
    Powershell command: docker pull goyalzz/ubuntu-java-8-maven-docker-image

  3. start container with bash
    Powershell command: docker run -ti goyalzz/ubuntu-java-8-maven-docker-image bash

  4. get nano (if changes are needed in code)
    Bash command: apt-get update
    Bash command: apt-get install nano

  5. get traccar repo
    Bash command: git clone --recursive https://github.com/tananaev/traccar.git

  6. make changes in code using nano (google it)

  7. compile
    Bash command inside traccar dir: mvn package

  8. run in another powershell before closing the docker image
    Powershell command: docker cp docker_container_name:/traccar /[path on your drive]

You can probably optimise this a bit but at least this gives you a start.

Cheers!