由 BG6RSH » 周一 11月 30, 2020 8:15 pm
1、在群晖Docker管理器中下载“traccar/traccar”镜像,并生成容器“traccar-traccar1”,启动这个容器。
- d1.PNG (14.16 KiB) 查看 657 次
- d2.PNG (53.96 KiB) 查看 657 次
2、PuTTY登录群晖SSH,运行“sudo -i”命令进入root用户,更新traccar配置文件
login as: admin
admin@192.168.3.8's password:
admin@DiskStation:~$ sudo -i
Password:
root@DiskStation:~# docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd3b082c2e75 traccar/traccar:latest "java -Xms512m -Xmx5…" 7 minutes ago Up 7 minutes 0.0.0.0:8090->8082/tcp traccar-traccar1
root@DiskStation:~# docker exec -it traccar-traccar1 /bin/sh
/opt/traccar # wget -O tracker-server.jar http://traccar.atoo.top:5080/downloads/traccar4.11/tracker-server.jar
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
tracker-server.jar 100% |********************************| 2263k 0:00:00 ETA
/opt/traccar # wget -O ./web/app.min.js http://traccar.atoo.top:5080/downloads/traccar4.11/app.min.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
app.min.js 100% |********************************| 200k 0:00:00 ETA
/opt/traccar # wget -O ./web/l10n/zh.json http://traccar.atoo.top:5080/downloads/traccar4.11/zh.json
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
zh.json 100% |********************************| 17310 0:00:00 ETA
/opt/traccar # wget -O ./web/app/view/map/BaseMap.js http://traccar.atoo.top:5080/downloads/traccar4.11/BaseMap.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
BaseMap.js 100% |********************************| 9984 0:00:00 ETA
/opt/traccar # wget -O ./web/app/store/MapTypes.js http://traccar.atoo.top:5080/downloads/traccar4.11/MapTypes.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
MapTypes.js 100% |********************************| 1690 0:00:00 ETA
/opt/traccar # exit
root@DiskStation:~#
3、利用“traccar-traccar1”容器制作新的镜像“traccar-amap”,修改标记为“bg6rsh/traccar-amap:4.11”
root@DiskStation:~# docker commit -a 'www.tansoo.cn' -m 'traccar for amap.' traccar-traccar1 traccar-amap
sha256:7baec54c97faf1949cdfa3569db5cdc45eb63d58adc794b514ede1126b5175cb
root@DiskStation:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
traccar-amap latest 7baec54c97fa 25 seconds ago 163MB
traccar/traccar latest 28cfcdc02d64 3 weeks ago 160MB
root@DiskStation:~# docker tag traccar-amap:latest bg6rsh/traccar-amap:4.11
root@DiskStation:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bg6rsh/traccar-amap 4.11 7baec54c97fa 4 minutes ago 163MB
traccar-amap latest 7baec54c97fa 4 minutes ago 163MB
traccar/traccar latest 28cfcdc02d64 3 weeks ago 160MB
root@DiskStation:~#
4、上传镜像到Docker仓库。
root@DiskStation:~# docker push bg6rsh/traccar-amap:4.11
The push refers to repository [docker.io/bg6rsh/traccar-amap]
543ee091de35: Pushed
dea4b774c6e0: Layer already exists
0ffaa7fa7b95: Layer already exists
edd61588d126: Layer already exists
9b9b7f3d56a0: Layer already exists
f1b5933fe4b5: Layer already exists
4.11: digest: sha256:beaa7c1add22fbe09680166fd6f1d4841166e6d1b2eecc3b678e2f39acba1d10 size: 1577
root@DiskStation:~#
[size=150]1、在群晖Docker管理器中下载“traccar/traccar”镜像,并生成容器“traccar-traccar1”,启动这个容器。[/size]
[attachment=1]d1.PNG[/attachment]
[attachment=0]d2.PNG[/attachment]
[size=150]2、PuTTY登录群晖SSH,运行“sudo -i”命令进入root用户,更新traccar配置文件[/size]
[Codebox=bash file=Untitled.bsh]
login as: admin
admin@192.168.3.8's password:
admin@DiskStation:~$ sudo -i
Password:
[/Codebox]
[Codebox=bash file=Untitled.bsh]
root@DiskStation:~# docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd3b082c2e75 traccar/traccar:latest "java -Xms512m -Xmx5…" 7 minutes ago Up 7 minutes 0.0.0.0:8090->8082/tcp traccar-traccar1
root@DiskStation:~# docker exec -it traccar-traccar1 /bin/sh
/opt/traccar # wget -O tracker-server.jar http://traccar.atoo.top:5080/downloads/traccar4.11/tracker-server.jar
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
tracker-server.jar 100% |********************************| 2263k 0:00:00 ETA
/opt/traccar # wget -O ./web/app.min.js http://traccar.atoo.top:5080/downloads/traccar4.11/app.min.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
app.min.js 100% |********************************| 200k 0:00:00 ETA
/opt/traccar # wget -O ./web/l10n/zh.json http://traccar.atoo.top:5080/downloads/traccar4.11/zh.json
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
zh.json 100% |********************************| 17310 0:00:00 ETA
/opt/traccar # wget -O ./web/app/view/map/BaseMap.js http://traccar.atoo.top:5080/downloads/traccar4.11/BaseMap.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
BaseMap.js 100% |********************************| 9984 0:00:00 ETA
/opt/traccar # wget -O ./web/app/store/MapTypes.js http://traccar.atoo.top:5080/downloads/traccar4.11/MapTypes.js
Connecting to traccar.atoo.top:5080 (221.235.88.186:5080)
MapTypes.js 100% |********************************| 1690 0:00:00 ETA
/opt/traccar # exit
root@DiskStation:~#
[/Codebox]
[size=150]3、利用“traccar-traccar1”容器制作新的镜像“traccar-amap”,修改标记为“bg6rsh/traccar-amap:4.11”[/size]
[Codebox=bash file=Untitled.bsh]root@DiskStation:~# docker commit -a 'www.tansoo.cn' -m 'traccar for amap.' traccar-traccar1 traccar-amap
sha256:7baec54c97faf1949cdfa3569db5cdc45eb63d58adc794b514ede1126b5175cb
root@DiskStation:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
traccar-amap latest 7baec54c97fa 25 seconds ago 163MB
traccar/traccar latest 28cfcdc02d64 3 weeks ago 160MB
root@DiskStation:~# docker tag traccar-amap:latest bg6rsh/traccar-amap:4.11
root@DiskStation:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bg6rsh/traccar-amap 4.11 7baec54c97fa 4 minutes ago 163MB
traccar-amap latest 7baec54c97fa 4 minutes ago 163MB
traccar/traccar latest 28cfcdc02d64 3 weeks ago 160MB
root@DiskStation:~#
[/Codebox]
[size=150]4、上传镜像到Docker仓库。[/size]
[Codebox=bash file=Untitled.bsh]root@DiskStation:~# docker push bg6rsh/traccar-amap:4.11
The push refers to repository [docker.io/bg6rsh/traccar-amap]
543ee091de35: Pushed
dea4b774c6e0: Layer already exists
0ffaa7fa7b95: Layer already exists
edd61588d126: Layer already exists
9b9b7f3d56a0: Layer already exists
f1b5933fe4b5: Layer already exists
4.11: digest: sha256:beaa7c1add22fbe09680166fd6f1d4841166e6d1b2eecc3b678e2f39acba1d10 size: 1577
root@DiskStation:~#
[/Codebox]