diff --git a/README.md b/README.md index 63e32b3..d2ce116 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ Current version: **3.16** ### Current tags: -- **3.16-alpine**, **3.16**, **alpine** or **latest** ([alpine/Dockerfile](https://github.com/traccar/traccar-docker/blob/master/alpine/Dockerfile)) [![](https://images.microbadger.com/badges/image/traccar/traccar:alpine.svg)](https://microbadger.com/images/traccar/traccar:alpine) -- **3.16-debian**, **debian** ([debian/Dockerfile](https://github.com/traccar/traccar-docker/blob/master/debian/Dockerfile)) [![](https://images.microbadger.com/badges/image/traccar/traccar:debian.svg)](https://microbadger.com/images/traccar/traccar:debian) +- **3.16-alpine**, **3.16**, **alpine** or **latest** ([alpine/Dockerfile](https://github.com/traccar/traccar-docker/blob/3.16/alpine/Dockerfile)) [![](https://images.microbadger.com/badges/image/traccar/traccar:3.16-alpine.svg)](https://microbadger.com/images/traccar/traccar:3.16-alpine) +- **3.16-debian**, **debian** ([debian/Dockerfile](https://github.com/traccar/traccar-docker/blob/3.16/debian/Dockerfile)) [![](https://images.microbadger.com/badges/image/traccar/traccar:3.16-debian.svg)](https://microbadger.com/images/traccar/traccar:3.16-debian) ### Container creation example: @@ -22,7 +22,7 @@ Current version: **3.16** docker run \ --rm \ --entrypoint cat \ - traccar/traccar \ + traccar/traccar:3.16 \ /opt/traccar/conf/traccar.xml > /var/docker/traccar/traccar.xml ``` @@ -37,9 +37,13 @@ Current version: **3.16** -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 \ - traccar/traccar + traccar/traccar:3.16 ``` + +### Default JRE options: + +- -Xms512m +- -Xmx512m +- -Djava.net.preferIPv4Stack=true diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 72cafa6..d9e6c64 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -5,16 +5,12 @@ ENV TRACCAR_VERSION 3.16 WORKDIR /opt/traccar RUN set -ex && \ - apk add --no-cache wget && \ - \ - wget -qO /tmp/traccar.zip https://github.com/tananaev/traccar/releases/download/v$TRACCAR_VERSION/traccar-other-$TRACCAR_VERSION.zip && \ + apk add --no-cache --no-progress wget && \ + wget -qO /tmp/traccar.zip https://github.com/traccar/traccar/releases/download/v$TRACCAR_VERSION/traccar-other-$TRACCAR_VERSION.zip && \ unzip -qo /tmp/traccar.zip -d /opt/traccar && \ rm /tmp/traccar.zip && \ - \ apk del wget -EXPOSE 8082 +ENTRYPOINT ["java", "-Xms512m", "-Xmx512m", "-Djava.net.preferIPv4Stack=true"] -ENTRYPOINT ["java"] - -CMD ["-Djava.net.preferIPv4Stack=true", "-Xms512m", "-Xmx512m", "-jar", "tracker-server.jar", "conf/traccar.xml"] +CMD ["-jar", "tracker-server.jar", "conf/traccar.xml"] diff --git a/debian/Dockerfile b/debian/Dockerfile index f248d07..3163586 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -5,12 +5,10 @@ ENV TRACCAR_VERSION 3.16 WORKDIR /opt/traccar RUN set -ex && \ - curl -LSso /tmp/traccar.zip https://github.com/tananaev/traccar/releases/download/v$TRACCAR_VERSION/traccar-other-$TRACCAR_VERSION.zip && \ + curl -LSso /tmp/traccar.zip https://github.com/traccar/traccar/releases/download/v$TRACCAR_VERSION/traccar-other-$TRACCAR_VERSION.zip && \ unzip -qo /tmp/traccar.zip -d /opt/traccar && \ rm /tmp/traccar.zip -EXPOSE 8082 +ENTRYPOINT ["java", "-Xms512m", "-Xmx512m", "-Djava.net.preferIPv4Stack=true"] -ENTRYPOINT ["java"] - -CMD ["-Djava.net.preferIPv4Stack=true", "-Xms512m", "-Xmx512m", "-jar", "tracker-server.jar", "conf/traccar.xml"] +CMD ["-jar", "tracker-server.jar", "conf/traccar.xml"]