From a346f5d857e0c7943c5a56f07cf426d86aee0d6f Mon Sep 17 00:00:00 2001 From: Maxim Zalysin Date: Sat, 18 Feb 2017 16:09:20 +0300 Subject: [PATCH] Refactoring Dockerfile and update Traccar server to version 3.10 --- Dockerfile | 25 ++++++++++++++++--------- README.md | 4 +++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7cc0db4..eae0f36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,22 @@ -FROM java:8-alpine +FROM java:8-jre-alpine MAINTAINER Maxim Zalysin -LABEL pro.magnaz.docker.traccar.version="{\"container\": \"16.11.19\", \"traccar\": \"3.8\"}" - -ADD https://github.com/tananaev/traccar/releases/download/v3.8/traccar-other-3.8.zip /tmp/ - -RUN mkdir -p /opt/traccar && unzip -o /tmp/traccar-other-3.8.zip -d /opt/traccar && rm /tmp/traccar-other-3.8.zip - -EXPOSE 8082 5000-5150 5000-5150/udp +ENV TRACCAR_VERSION 3.10 WORKDIR /opt/traccar -ENTRYPOINT ["java", "-Djava.net.preferIPv4Stack=true", "-Xms512m", "-jar", "tracker-server.jar", "conf/traccar.xml"] +RUN set -ex && \ + apk add --no-cache --virtual install-dependencies wget && \ + \ + wget -qO /tmp/traccar.zip https://github.com/tananaev/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 install-dependencies + +EXPOSE 8082 + +ENTRYPOINT ["java"] + +CMD ["-Djava.net.preferIPv4Stack=true", "-Xms512m", "-jar", "tracker-server.jar", "conf/traccar.xml"] diff --git a/README.md b/README.md index 7abdf84..575cc51 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,6 @@ Free and Open Source GPS Tracking Platform [![](https://images.microbadger.com/badges/image/magnaz/traccar.svg)](http://microbadger.com/images/magnaz/traccar "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/magnaz/traccar.svg)](http://microbadger.com/images/magnaz/traccar "Get your own version badge on microbadger.com") -Official website: https://www.traccar.org \ No newline at end of file +Current version: 3.10 + +Official website: https://www.traccar.org