You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docker/docker_tools.py
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -217,17 +217,6 @@ def init(
217
217
# Ensure Docker is installed.
218
218
try:
219
219
xqt("docker --version")
220
-
# Ensure the Docker Desktop is running if this is OS X. On OS X, the ``docker`` command exists, but can't run the hello, world script.
221
-
ifis_darwin:
222
-
print("Checking that the Docker Desktop is running...")
223
-
try:
224
-
xqt("docker run hello-world")
225
-
exceptsubprocess.CalledProcessErrorase:
226
-
print(f"Unable to execute docker run hello-world: {e}")
227
-
sys.exit(
228
-
"ERROR: Docker Desktop not detected. You must install and run this\n"
229
-
"before proceeding."
230
-
)
231
220
exceptsubprocess.CalledProcessErrorase:
232
221
print(f"Unable to run docker: {e}")
233
222
# Ensure the Docker Desktop is running if we're running in WSL. On Windows, the ``docker`` command doesn't exist when the Docker Desktop isn't running.
# The group add doesn't take effect until the user logs out then back in. Work around it for now.
258
247
did_group_add=True
259
248
249
+
# Ensure the Docker Desktop is running if this is OS X. On OS X, the ``docker`` command exists, but can't run the hello, world script. It also serves as a sanity check for the other platforms.
250
+
print("Checking that Docker works...")
251
+
try:
252
+
xqt("docker run hello-world")
253
+
exceptsubprocess.CalledProcessErrorase:
254
+
print(f"Unable to execute docker run hello-world: {e}")
255
+
sys.exit(
256
+
(
257
+
"ERROR: Docker Desktop not detected. You must install and run this\n"
258
+
"before proceeding."
259
+
)
260
+
ifis_darwin
261
+
else"ERROR: Unable to run a basic Docker application."
0 commit comments