Skip to content

Commit

Permalink
improved docker/container-running-with-name?
Browse files Browse the repository at this point in the history
  • Loading branch information
jlangch committed Sep 1, 2023
1 parent 51c0ae2 commit 81b0be2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/resources/com/github/jlangch/venice/docker.venice
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
"""
:examples '(
"""
;; Run an ArangoDB container
;; Run an ArangoDB container (use bind mounts, very slow on macOSX)
(docker/run "arangodb/arangodb:3.10.10"
:name "myapp"
:publish "8529:8529"
Expand All @@ -329,16 +329,18 @@
"/Users/foo/arangodb/apps:/var/lib/arangodb3-apps"])
""",
"""
;; Run an ArangoDB container
;; Run an ArangoDB container (use docker volume, faster than bind mount)
(docker/volume-create "arangodb-db")
(docker/volume-create "arangodb-apps")
(docker/run "arangodb/arangodb:3.10.10"
:name "myapp"
:publish "8529:8529"
:detach true
:envs ["ARANGO_ROOT_PASSWORD=xxxxxx"
"ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY=8G"
"ARANGODB_OVERRIDE_DETECTED_NUMBER_OF_CORES=1"]
:volumes ["/Users/foo/arangodb/db:/var/lib/arangodb3"
"/Users/foo/arangodb/apps:/var/lib/arangodb3-apps"]
:volumes ["arangodb-db:/var/lib/arangodb3"
"arangodb-apps:/var/lib/arangodb3-apps"]
:args ["--database.auto-upgrade"])
""" )
:see-also '(
Expand Down Expand Up @@ -942,7 +944,9 @@

(->> (docker/ps :all true :format :json)
(filter #(== name (get % "Names")))
(filter #(== "running" (get % "State")))))
(filter #(== "running" (get % "State")))
(count)
(pos?)))


(defn
Expand Down

0 comments on commit 81b0be2

Please sign in to comment.