diff options
author | bvoudenaarde <oudenaar@gmail.com> | 2016-11-21 14:41:28 +0100 |
---|---|---|
committer | bvoudenaarde <oudenaar@gmail.com> | 2016-11-21 14:41:28 +0100 |
commit | e2ba4c0793489f40a48555c34fce32ad5e19db6b (patch) | |
tree | e179637f9622d0ea43ac35ea2f77eb1696521805 | |
parent | 82f51b570a0957587b25b48fdb5cfd21c4b14e9d (diff) | |
download | traccar-server-e2ba4c0793489f40a48555c34fce32ad5e19db6b.tar.gz traccar-server-e2ba4c0793489f40a48555c34fce32ad5e19db6b.tar.bz2 traccar-server-e2ba4c0793489f40a48555c34fce32ad5e19db6b.zip |
small fixes getting image build again
-rw-r--r-- | README.md | 19 | ||||
-rw-r--r-- | setup/docker/Dockerfile | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | setup/docker/build.sh | 7 |
3 files changed, 25 insertions, 4 deletions
@@ -9,6 +9,25 @@ Traccar is open source server for various GPS tracking devices. Project is writt Please read [build from source documentation](https://www.traccar.org/build/) on the official website. +To build the Docker images first clone: + +$ git clone git@github.com:tananaev/traccar.git +$ cd traccar + +Now init submodules: + +$ git submodule init +$ git submodule update + +Now you are able to build docker images: + +$ chmod 755 ./setup/docker/build.sh +$ ./setup/docker/build.sh + +Running docker container based on this images: + +$ docker run --name traccar -ti tananaev/traccar:<TAG> + ## Team - Anton Tananaev ([anton@traccar.org](mailto:anton@traccar.org)) diff --git a/setup/docker/Dockerfile b/setup/docker/Dockerfile index 40b650be1..912ea4fd5 100644 --- a/setup/docker/Dockerfile +++ b/setup/docker/Dockerfile @@ -13,6 +13,7 @@ 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/web /opt/traccar/web COPY ./tmp/lib /opt/traccar/lib @@ -23,4 +24,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..59280aaff 100644..100755 --- a/setup/docker/build.sh +++ b/setup/docker/build.sh @@ -13,12 +13,13 @@ 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 '/web.path/ && !modif { printf(" <entry key=\"web.debug\">true</entry>\n"); modif=1 } {print}' > ${tmp}/traccar.xml +cp -rf ./setup/default.xml ${tmp} cp -rf ./schema ${tmp}/schema cp -rf ./target/tracker-server.jar ${tmp}/traccar-server.jar cp -rf ./target/lib ${tmp}/lib -cp -rf ./web ${tmp}/web +cp -rf ./traccar-web/web ${tmp}/web docker build -t ${company}/${software}:${version} ./setup/docker/ -rm -rf ${tmp}
\ No newline at end of file +rm -rf ${tmp} |