2018-04-22 23:07:15 +00:00
|
|
|
Traccar in Docker
|
2020-05-26 22:50:31 +00:00
|
|
|
---
|
2019-05-10 20:17:55 +00:00
|
|
|
|
2018-04-22 23:07:15 +00:00
|
|
|
Traccar GPS Tracking System in Docker image.
|
2016-09-06 22:40:23 +00:00
|
|
|
|
2020-05-26 22:50:31 +00:00
|
|
|
Official website: <https://www.traccar.org>
|
|
|
|
|
|
|
|
|
2020-02-19 06:28:36 +00:00
|
|
|
[![](https://images.microbadger.com/badges/version/traccar/traccar:4.8.svg)](https://microbadger.com/images/traccar/traccar:4.8)
|
2020-05-26 22:50:31 +00:00
|
|
|
[![](https://images.microbadger.com/badges/image/traccar/traccar:4.8.svg)](https://microbadger.com/images/traccar/traccar:4.8)
|
2017-02-18 13:09:20 +00:00
|
|
|
|
2020-05-26 22:50:31 +00:00
|
|
|
### Available tags:
|
|
|
|
- **4.8-alpine**, **4-alpine**, **4.8**, **alpine**, **latest**
|
|
|
|
- **4.8-debian**, **4-debian**, **debian**
|
|
|
|
- **4.7-alpine**, **4.7**
|
|
|
|
- **4.7-debian**
|
|
|
|
- **4.6-alpine**, **4.6**
|
|
|
|
- **4.6-debian**
|
|
|
|
- **4.5-alpine**, **4.5**
|
|
|
|
- **4.5-debian**
|
|
|
|
- **4.4-alpine**, **4.4**
|
|
|
|
- **4.4-debian**
|
|
|
|
- **4.3-alpine**, **4.3**
|
|
|
|
- **4.3-debian**
|
|
|
|
- **4.2-alpine**, **4.2**
|
|
|
|
- **4.2-debian**
|
|
|
|
- **4.1-alpine**, **4.1**
|
|
|
|
- **4.1-debian**
|
|
|
|
- **4.0-alpine**, **4.0**
|
|
|
|
- **4.0-debian**
|
|
|
|
- **3.17-alpine**, **3.17**
|
|
|
|
- **3.17-debian**
|
|
|
|
- **3.16-alpine**, **3.16**
|
|
|
|
- **3.16-debian**
|
2017-07-08 10:05:29 +00:00
|
|
|
|
2020-05-26 22:50:31 +00:00
|
|
|
### Container create example:
|
2017-07-08 10:05:29 +00:00
|
|
|
1. **Create work directories:**
|
|
|
|
```bash
|
|
|
|
mkdir -p /var/docker/traccar/logs
|
|
|
|
```
|
|
|
|
|
|
|
|
1. **Get default traccar.xml:**
|
|
|
|
```bash
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--entrypoint cat \
|
2019-05-01 09:45:19 +00:00
|
|
|
traccar/traccar:latest \
|
2017-07-08 10:05:29 +00:00
|
|
|
/opt/traccar/conf/traccar.xml > /var/docker/traccar/traccar.xml
|
|
|
|
```
|
|
|
|
|
2019-05-01 09:49:20 +00:00
|
|
|
1. **Edit traccar.xml:** <https://www.traccar.org/configuration-file/>
|
2017-07-08 10:05:29 +00:00
|
|
|
|
|
|
|
1. **Create container:**
|
|
|
|
```bash
|
|
|
|
docker run \
|
|
|
|
-d --restart always \
|
|
|
|
--name traccar \
|
|
|
|
--hostname traccar \
|
|
|
|
-p 80:8082 \
|
|
|
|
-p 5000-5150:5000-5150 \
|
|
|
|
-p 5000-5150:5000-5150/udp \
|
|
|
|
-v /var/docker/traccar/logs:/opt/traccar/logs:rw \
|
|
|
|
-v /var/docker/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro \
|
2020-06-23 14:08:42 +00:00
|
|
|
-v /var/docker/traccar/data:/opt/traccar/data:rw \
|
2019-05-01 09:45:19 +00:00
|
|
|
traccar/traccar:latest
|
2017-07-08 10:05:29 +00:00
|
|
|
```
|
2018-09-10 20:49:31 +00:00
|
|
|
|
2020-05-26 22:50:31 +00:00
|
|
|
### Default JVM options:
|
2018-09-10 20:49:31 +00:00
|
|
|
- -Xms512m
|
|
|
|
- -Xmx512m
|
|
|
|
- -Djava.net.preferIPv4Stack=true
|