Refactoring Dockerfile and update Traccar server to version 3.10

This commit is contained in:
Maxim Zalysin 2017-02-18 16:09:20 +03:00
parent cea13d370a
commit a346f5d857
2 changed files with 19 additions and 10 deletions

View File

@ -1,15 +1,22 @@
FROM java:8-alpine
FROM java:8-jre-alpine
MAINTAINER Maxim Zalysin <zalysin.m@gmail.com>
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"]

View File

@ -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
Current version: 3.10
Official website: https://www.traccar.org