I'm new to Docker and following through the Get started documentation, https://docs.docker.com/docker-for-windows/#explore-the-application-and-run-examples.
When I run 'docker run -it ubuntu bash' I get the following error:
Unable to find image 'ubuntu:latest' locally latest: Pulling from
library/ubuntu C:\Program
Files\Docker\Docker\Resources\bin\docker.exe: no matching manifest for
windows/amd64 in the manifest list entries. See 'C:\Program
Files\Docker\Docker\Resources\bin\docker.exe run --help'.
Here's additional docker information:
docker version
Client:
Version: 17.06.1-ce
API version: 1.30
Go version: go1.8.3
Git commit: 874a737
Built: Thu Aug 17 22:48:20 2017
OS/Arch: windows/amd64
Server:
Version: 17.06.1-ce
API version: 1.30 (minimum version 1.24)
Go version: go1.8.3
Git commit: 874a737
Built: Thu Aug 17 23:03:03 2017
OS/Arch: windows/amd64
Experimental: true
docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 17.06.1-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 12
Total Memory: 31.92GiB
ID: ZVBR:TM24:KXS3:NF5Y:WJTD:7JR3:S4UB:TFIZ:7G32:EHIL:4TKD:RK3V
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 20
System Time: 2017-09-28T10:05:53.8801328-07:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
I'm a little confused why the OS/Arch version shows windows/amd64 while Architecture under info shows x86_64.
Any help with the error message would be great.
Your issue is that your are using docker in Windows container mode and trying to pull a ubuntu image which is linux container image. You can't do that. You can run either windows containers or you can run linux containers.
You can switch to Linux container mode by right clicking on the docker tray icon as shown in below image
Also windows/amd64 and x86_64 is both indicate 64bit OS and nothing else
Related
My docker image should be able to access private git repository on github via ssh. For that I am trying to make host's ssh client accessible to the builder. The image should not store secrets and should work on any host whatever that host may be.
On my windows machine I do the following (inside the folder containing my Dockerfile):
SET SSH_AUTH_SOCK=\\.\\pipe\\openssh-ssh-agent
SET DOCKER_BUILDKIT=1
docker build --ssh default .
And I get:
could not parse ssh: [default]: failed to open \\.\\pipe\\openssh-ssh-agent: open \\.\\pipe\\openssh-ssh-agent: All pipe instances are busy.
The outcome doesn't depend on the contents of the Dockerfile: same happens with any Dockerfile, such as this:
FROM alpine:latest
Versions info:
OpenSSH (by running ssh -V):
OpenSSH_for_Windows_8.6p1, LibreSSL 3.0.2
(originally it was 8.1; the error was already present)
docker (by running docker version):
Client:
Cloud integration: v1.0.20
Version: 20.10.10
API version: 1.41
Go version: go1.16.9
Git commit: b485636
Built: Mon Oct 25 07:47:53 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.10
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:41:30 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.11
GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Other info:
\\.\\pipe\\openssh-ssh-agent is present within the output of
[System.IO.Directory]::GetFiles("\\.\\pipe\\") (ran in powershell)
ssh-agent StartupType is set to Automatic and GET-SERVICE ssh-agent (ran in powershell) says the service is Running
Using windows-latest runner I was not able to pull a windows docker image.
Setup
yaml file
name: Docker
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout#v2
- name: docker version
run: docker version
- name: docker info
run: docker info
- name: Pull image
run: docker pull mcr.microsoft.com/windows:2009
- name: Build image
run: docker build -f win.Dockerfile .
Dockerfile
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/microsoft-windows
FROM mcr.microsoft.com/windows:2009 AS env
RUN Get-ChildItem Env:
RUN cmake -version
src: https://github.com/Mizux/inspect-ci
Observed
$ docker version
Client: Docker Engine - Enterprise
Version: 19.03.12
API version: 1.40
Go version: go1.13.13
Git commit: 4306744
Built: 08/05/2020 19:27:53
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Enterprise
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.24)
Go version: go1.13.13
Git commit: f295753ffd
Built: 08/05/2020 19:26:41
OS/Arch: windows/amd64
Experimental: false
$ docker info
Client:
Debug Mode: false
Plugins:
cluster: Manage Docker Enterprise clusters (Mirantis Inc., v1.6.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 5
Server Version: 19.03.12
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.1518)
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 7GiB
Name: fv-az68-962
ID: 7OIU:P7VO:DVY5:6QUE:34MP:ZFAE:EN7P:4BVA:3MEH:G5VM:ZVMS:LAND
Docker Root Dir: C:\ProgramData\docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
$ docker pull mcr.microsoft.com/windows:2009
no matching manifest for windows/amd64 10.0.17763 in the manifest list entries
Since it is a runner, it's headless so please don't ask me to "click" on system tray...
ref:
https://hub.docker.com/_/microsoft-windows
https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
The base image you are requesting (mcr.microsoft.com/windows:2009) is not compatible with underlying Docker backend pre-installed on windows-latest runners. If you look at docker version/info output you can see those values:
OS/Arch: windows/amd64
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
This is why you get the error:
no matching manifest for windows/amd64 10.0.17763 in the manifest list entries
You should switch to a compatible base image to fix it. You can find one at https://hub.docker.com/_/microsoft-windows. Navigate to §Full Tag Listing section and inspect the Architecture and OsVersion column to find the matching image tag to switch to (eg.: mcr.microsoft.com/windows:10.0.17763.1518).
I've created a Scala project that creates a testcontainer (via com.dimafeng.testcontainers) with two Docker's containers (singularities/datastore-emulator and bigtruedata/gcloud-pubsub-emulator). The testcontainer is successfully created, when I run the docker ps command this is what I see:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ddc16471205a quay.io/testcontainers/ryuk:0.2.2 "/app" 2 minutes ago Up 2 minutes 0.0.0.0:32771->8080/tcp testcontainers-ryuk-371a41c2-3d23-426f-943d-608a816c96d3
Now, the problem occurs when I try to run the container:
$ docker run -p 4000:80 quay.io/testcontainers/ryuk:0.2.2
2018/12/13 10:59:48 Starting on port 8080...
panic: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
goroutine 1 [running]:
main.main()
/go/src/github.com/bsideup/moby-ryuk/main.go:31 +0xe2e
And if I go inside the container and run the /app command this is what I get:
$ docker exec -it ddc /bin/sh
/ # /app
2018/12/13 11:40:55 Starting on port 8080...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x64f8d6]
goroutine 9 [running]:
main.main.func1(0xc4200685a0, 0xc4201bd890, 0xc420068600)
/go/src/github.com/bsideup/moby-ryuk/main.go:42 +0x286
created by main.main
/go/src/github.com/bsideup/moby-ryuk/main.go:39 +0x1b5
I've tried literally everything from setting the docker-machine eval default to check all the possible permissions problems. What am I missing?
(I have no access at all to the go files present in the errors)
Here's the information about my docker installation
$ docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false
And the infos
$ docker info
Containers: 19
Running: 1
Paused: 0
Stopped: 18
Images: 7
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: 5XHJ:QGZD:4I55:WLU6:RLUF:E5XL:XFUL:PMBB:D432:IJFX:EUPG:QEVW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 33
Goroutines: 58
System Time: 2018-12-13T11:34:52.2335167Z
EventsListeners: 2
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
I don't understand what's the problem ?
I installed Docker on Win10. This is my first experience with it.
I read the manuals, start hello-world, and more.
Next, I need to use the command mvn compile in the folder of the repository. For this needed to install Mavin.
I see this: https://hub.docker.com/_/maven/ and used:
docker run -it --rm --name my-maven-project -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-7 mvn clean install
... and I get the output
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: invalid reference format.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
Output docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: windows/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: true
Output docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 3
Server Version: 17.09.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.49-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: O3WT:CHTU:34YG:IYV3:OELC:RSAW:WSYD:E3HV:2ZUO:DWBU:JXOB:EN4Y
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 16
Goroutines: 26
System Time: 2017-10-25T18:44:10.1162161Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Sorry for the stupid question, first time working with Docker... Thanks!
You need to use the right syntax for the current folder, in the right environment:
in a simple CMD shell session, you would use:
-v "%cd%":/usr/src/mymaven
in a Powershell session
-v ${PWD}:/usr/src/mymaven
I had a situation:
the dash was Unicode dash not ASCII minus (need to retype the dashes)
‐ 8208 2010 HYPHEN
‑ 8209 2011 NON-BREAKING HYPHEN
‒ 8210 2012 FIGURE DASH
– 8211 2013 – EN DASH
— 8212 2014 — EM DASH
― 8213 2015 HORIZONTAL BAR
You can use the below syntax on PowerShell:
docker run --name mc1 -d -p 8001:83 imagename
mc1- name of the running instance
8001:83 - port
I'm a bit confused about the default docker machine on Mac.
Currently, my docker-machine ls shows a machine called default but it's not running. And yet I can still run containers without a problem. I believe what happened was I was having problem with the default setup and I rm and created the default machine. But apparently default is NOT the default machine because when I switch to it with eval $(docker-machine env default) I see completely different images and containers.
What is the default docker machine on Mac?
Here is my versions:
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.7.1
Git commit: 6f9534c
Built: Thu Sep 8 10:31:18 2016
OS/Arch: darwin/amd64
Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 17:52:38 2016
OS/Arch: linux/amd64
docker info output:
Containers: 15
Running: 1
Paused: 0
Stopped: 14
Images: 52
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 270
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host overlay null bridge
Swarm: active
NodeID: exto91f6u59r77znpa3kj9ufp
Is Manager: true
ClusterID: 5my0ngxiaozvdt6s44icecy4y
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.65.2
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.953 GiB
Name: moby
ID: 3QHL:JAAF:XUSR:KR5Q:APNG:Z4LN:XSFR:53YC:6VBQ:DZJE:DM6G:MWXY
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 38
Goroutines: 128
System Time: 2016-10-23T02:24:34.36197692Z
EventsListeners: 1
Username: yijian
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Probably you upgraded to docker for mac which no longer use docker-machine to emulate a docker environment in Mac.
You can still use docker-machine primarily for manage remote docker engines.
Regards