mirror of
https://github.com/traccar/traccar-docker
synced 2024-11-16 21:26:10 +00:00
b023e88ce7
3.16 fixes |
||
---|---|---|
alpine | ||
debian | ||
README.md |
Traccar in Docker
Traccar GPS Tracking System in Docker image.
Official website: https://www.traccar.org
Current version: 3.16
Current tags:
- 3.16-alpine, 3.16, alpine or latest (alpine/Dockerfile)
- 3.16-debian, debian (debian/Dockerfile)
- 3.15-alpine, 3.15 (alpine/Dockerfile)
- 3.15-debian (debian/Dockerfile)
- 3.14-alpine, 3.14 (alpine/Dockerfile)
- 3.14-debian (debian/Dockerfile)
Container creation example:
-
Create work directories:
mkdir -p /var/docker/traccar/logs
-
Get default traccar.xml:
docker run \ --rm \ --entrypoint cat \ magnaz/traccar \ /opt/traccar/conf/traccar.xml > /var/docker/traccar/traccar.xml
-
Edit traccar.xml: https://www.traccar.org/configuration-file/
-
Create container:
docker run \ -d --restart always \ --name traccar \ --hostname traccar \ -p 80:8082 \ -p 5000-5150:5000-5150 \ -p 5000-5150:5000-5150/udp \ -v /etc/timezone:/etc/timezone:ro \ -v /etc/localtime:/etc/localtime:ro \ -v /var/docker/traccar/logs:/opt/traccar/logs:rw \ -v /var/docker/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \ magnaz/traccar