clip geometries based on geoserver wfs
1.1K
clipper-api in dockerglobal host_port, container_name, docker_image, mounted_folder, env_path, instance_exist
on run
set host_port to "4041"
set container_name to "clipper-api"
set docker_image to "yzhou16/clipper-api"
set env_path to "/Applications/Docker.app/Contents/Resources/bin/"
try
do shell script "export PATH=" & env_path & ":$PATH; docker stop " & container_name & "; docker rm -f " & container_name
set instance_exist to false
on error errMsg
set instance_exist to true
end try
RunUserDialog()
end run
on RunUserDialog()
set question to display dialog "Start/Stop Clipper API" buttons {"Start", "Stop", "Cancel"} default button 3
set answer to button returned of question
if answer is equal to "Start" then
if instance_exist is equal to true then
do shell script "export PATH=" & env_path & ":$PATH; docker stop " & container_name & "; docker rm -f " & container_name & "; docker run --name " & container_name & " -d -p " & host_port & ":4000 " & docker_image & "; exit;"
else
do shell script "export PATH=" & env_path & ":$PATH; docker run --name " & container_name & " -d -p " & host_port & ":4000 " & docker_image & "; exit;"
end if
end if
if answer is equal to "Stop" then
try
do shell script "export PATH=" & env_path & ":$PATH; docker stop " & container_name & "; docker rm -f " & container_name & "; exit;"
end try
end if
if answer is equal to "Cancel" then
do shell script "exit;"
end if
end RunUserDialog
Content type
Image
Digest
sha256:a07e83e0e…
Size
449.3 MB
Last updated
7 months ago
docker pull yzhou16/clipper-api