... without installing Maven on your computer. This process will use the Docker container maven:3.5-jdk-8-alpine
instead of a local Maven installation.
I used Ubuntu 16.04 server with the NGINX webserver.
Traccar can now be run in Docker without building it yourself, just get the container from Docker Hub: https://hub.docker.com/r/traccar/traccar/
The information below may still be useful for old installations or as a guideline for building similar Docker containers.
The nginx config and tk905 commands are still valid.
- Install Docker and git
- Grab a Traccar release, I used the v3.15 source code zip
- Extract it:
unzip v3.15.zip
- Git clone the Traccar web frontend repository into the "traccar-web" folder, matching the v3.15 version:
git clone --depth 1 --branch v3.15 https://github.com/tananaev/traccar-web.git traccar-3.15/traccar-web
- Copy the modified build.sh (see below in this gist) into
setup/docker
and run it from the Traccar-3.15 main folder:
./setup/docker/build.sh
- After the build has succeeded, start the container (see options in the Traccar Documentation):
docker run -d --name traccar-server -p 5000-5150:5000-5150 -p 8082:8082 tananaev/traccar:3.15-SNAPSHOT
- The Traccar web interface will now be available at http://localhost:8082 (after 10-20 or so seconds), login with the default admin/admin, change your password, disable registration... etc. Your Traccar installation is complete and running.
- Configure your web server (see NGINX config file in this gist, for example) and open ports in your firewall, if you know the required ones for your device:
ufw allow 5055 # phone app
ufw allow 5093 # tk905