docker / getting-started

Getting started with Docker
Apache License 2.0
2.91k stars 6.4k forks source link

Cannot build docker101tutorial fails with bad request API and version #342

Closed vemman closed 1 year ago

vemman commented 1 year ago

I just installed Docker Desktop and the initial tutorial itself is failing with the following error. I do have apache running on localhost.

As suggested in many places over the net I tried Docker-Cli -SwitchDaemon nothing seems to have happened. Also tried it in an elevated PS shell too same error.

PS > docker build -t docker101tutorial .
Sending build context to Docker daemon  12.89MB
request returned Bad Request for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.41/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=docker101tutorial&target=&ulimits=null&version=1, check if the server supports the requested API version

Docker Info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.12.2)
  dev: Docker Dev Environments (Docker Inc., v0.0.3)
  extension: Manages Docker extensions (Docker Inc., v0.2.13)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 7
  Running: 0
  Paused: 0
  Stopped: 6
 Images: 5
 Server Version: 4.3.0
 Storage Driver: overlay
  Using metacopy: false
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge macvlan
  Log: k8s-file none passthrough journald
 Swarm: inactive
 Runtimes: crun kata krun runc runj runsc
 Default Runtime: crun
 Init Binary:
 containerd version:
 runc version:
 init version:
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.102.1-microsoft-standard-WSL2
 Operating System: fedora
 OSType: linux
 Architecture: amd64
 CPUs: 12
 Total Memory: 11.96GiB
 Name: TPRAero13
 ID: e41dd695-ad67-4281-ab13-aec6dce877d9
 Docker Root Dir: /home/user/.local/share/containers/storage
 Debug Mode: false
 Experimental: true
 Live Restore Enabled: false
 Product License: Apache-2.0
mikesir87 commented 1 year ago

Hi @vemman! Apologies for not responding to you quicker. Were you able to get your issue figured out?

vemman commented 1 year ago

Hi @vemman! Apologies for not responding to you quicker. Were you able to get your issue figured out?

Sorry, I thought none noticed this. A full reinstall and some reading across internet help, not sure were. But building now works