Why can't I run "docker init"? Getting "'init' is not a docker command"
Asked Answered
A

4

16

I am trying to set up my app as a container. I run docker init in my terminal on my Mac, and I get

docker:'init' is not a docker command.

When I run docker --version, I get Docker version 20.10.8, build 3967b7d

I can also confirm that Docker is running.

Alfons answered 26/8, 2023 at 17:32 Comment(1)
I have 24.0.2, so, maybe you need to update.Momus
L
2

All you need to do is to download the "Docker Desktop" application. After that, you can re-run the command without any errors.

Leonard answered 9/10, 2023 at 11:48 Comment(1)
I have already added a docker desktop to my mac system but it does not work for me.Enroll
T
14

to use docker init you need Docker Desktop 4.26.1 and later.

Turbary answered 26/8, 2023 at 17:46 Comment(1)
4.18 doesn't support come with docker init, 4.26.1 doesPyrites
L
2

All you need to do is to download the "Docker Desktop" application. After that, you can re-run the command without any errors.

Leonard answered 9/10, 2023 at 11:48 Comment(1)
I have already added a docker desktop to my mac system but it does not work for me.Enroll
P
1

You need Docker desktop v4.26.1

Pyrites answered 11/1 at 2:8 Comment(0)
H
-1

docer init is not compatible with the linux OS.

Hylotheism answered 8/8 at 8:58 Comment(3)
how does that answer the question? The OP is using macOSNessus
macOS is based on FreeBSD Unix, not Linux.Landeros
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Mame

© 2022 - 2024 — McMap. All rights reserved.