mirror of
https://github.com/traccar/traccar-docker
synced 2024-11-10 19:10:24 +00:00
Update zip location and Dockerfile optimizations
This commit is contained in:
parent
a4fd62116b
commit
cfc81fd3a3
16
README.md
16
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
|
||||
|
@ -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"]
|
||||
|
8
debian/Dockerfile
vendored
8
debian/Dockerfile
vendored
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user