diff options
author | Philipp Prangenberg <philipp.prangenberg@derkurier.de> | 2016-12-05 12:03:08 +0100 |
---|---|---|
committer | Philipp Prangenberg <philipp.prangenberg@derkurier.de> | 2016-12-05 12:03:08 +0100 |
commit | a21f436a58133f7da0cae06366d729665f3b8f9c (patch) | |
tree | 72ff1743d96f79e4a9d85b0d48715e5f9aa67cf9 /setup/docker | |
parent | 960bf899414d89221e92138fdb98777c3f4f73ec (diff) | |
parent | 40607036c5aa6385a7ae3f3a283bf107238a5944 (diff) | |
download | trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.gz trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.bz2 trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'setup/docker')
-rw-r--r-- | setup/docker/Dockerfile | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | setup/docker/build.sh | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/setup/docker/Dockerfile b/setup/docker/Dockerfile index a39cad79c..d86b078c1 100644 --- a/setup/docker/Dockerfile +++ b/setup/docker/Dockerfile @@ -2,6 +2,8 @@ FROM java:8-alpine MAINTAINER Danilo Recchia <danilo.recchia@vortus.solutions> +USER root + RUN apk upgrade --update && \ apk add --update curl bash && \ rm -rf /var/cache/apk/* && \ @@ -11,7 +13,9 @@ RUN apk upgrade --update && \ ENV JAVA_OPTS -Xms256m -Xmx1024m COPY ./tmp/traccar.xml /opt/traccar/traccar.xml +COPY ./tmp/default.xml /opt/traccar/conf/default.xml COPY ./tmp/schema /opt/traccar/schema +COPY ./tmp/templates /opt/traccar/templates COPY ./tmp/web /opt/traccar/web COPY ./tmp/lib /opt/traccar/lib COPY ./tmp/traccar-server.jar /opt/traccar/traccar-server.jar @@ -21,4 +25,4 @@ EXPOSE 5000-5150 WORKDIR /opt/traccar -ENTRYPOINT ["java","-jar","traccar-server.jar","traccar.xml"]
\ No newline at end of file +ENTRYPOINT ["java","-jar","traccar-server.jar","traccar.xml"] diff --git a/setup/docker/build.sh b/setup/docker/build.sh index 31ee60a03..eedc633bc 100644..100755 --- a/setup/docker/build.sh +++ b/setup/docker/build.sh @@ -13,12 +13,18 @@ tmp="./setup/docker/tmp" mkdir -p ${tmp} -cat ./setup/unix/traccar.xml | awk '/web.path/ && !modif { printf(" <entry key=\"web.debug\">true</entry>\n"); modif=1 } {print}' > ${tmp}/traccar.xml +cat ./setup/traccar.xml | awk '/config.default/ && !modif { print;printf(" <entry key=\"web.debug\">true</entry>\n");next; modif=1 } {print}' > ${tmp}/traccar.xml +cp -rf ./setup/default.xml ${tmp} cp -rf ./schema ${tmp}/schema +cp -rf ./templates ${tmp}/templates cp -rf ./target/tracker-server.jar ${tmp}/traccar-server.jar cp -rf ./target/lib ${tmp}/lib -cp -rf ./web ${tmp}/web +if [ -d ./traccar-web/web ]; then + cp -rf ./traccar-web/web ${tmp}/web +else + mkdir ${tmp}/web +fi docker build -t ${company}/${software}:${version} ./setup/docker/ -rm -rf ${tmp}
\ No newline at end of file +rm -rf ${tmp} |