Getting "broken pipe" when building Docker image using boot2docker Mac - macos

I've followed the guide on http://docs.docker.io/en/latest/installation/mac/ which appears to work ok.
I can run docker version and docker ps etc but when I go to run a docker build . it starts uploading and returns with the message: "write tcp 127.0.0.1:4243: broken pipe" leaving me unable to build.

I logged into the VM boot2docker ssh, found the debug log at /var/lib/boot2docker/docker.log and noticed the first helpful messages:
2014/03/22 22:28:57 POST /v1.10/build?rm=1&t=foo
[debug] api.go:942 Warning: client and server don't have the same version (client: 0.9.0, server: 0.8.0)
[error] api.go:959 Error: Multipart upload for build is no longer supported. Please upgrade your docker client.
[error] api.go:91 HTTP Error: statusCode=500 Multipart upload for build is no longer supported. Please upgrade your docker client.
So my Mac client (host) Docker was v.9 and the daemon was .8. Not wanting to fiddle with the boot2docker image, I downgraded the client version of Docker to .8 by running:
rm /usr/local/bin/docker
cd ~/bin/
curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-0.8.0
sudo cp ~/bin/docker /usr/local/bin/
Then my image built ok.

Related

docker-compose not working in Windows powershell

I am trying to run the docker docker-compose build command in Windows but it isn't running. I get the following error.
[+] Building 0.0s (0/0)
error during connect: This error may indicate that the docker daemon is not running.: Get "http://%!F(MISSING)%!F(MISSING).%!F(MISSING)pipe%!F(MISSING)docker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.: driver not connecting
My docker-compose version is v2.5.0 but it doesn't let me run the build command. I even installed Docker for Windows and it only shows me the following issue.
Not sure how to proceed with this.

Run docker container with open62541 server on Raspberry Pi

Description
I am connected to my raspberry pi 1 ( via putty and I have already followed the steps as described here at "Building Debian Packages inside Docker Container with CMake on Ubuntu or Debian"
I have cloned the docker-deb-builder repo and build both the dockerfile-ubuntu-18.04 and
dockerfile-ubuntu-17.04.
Then, I have cloned the open62541 repo and checked out pack/1.0.
Afterwards, I have created the output folder in the docker-deb-builder folder and tried to run the
following command in the development folder:
./build -i docker-deb-builder:18.04 -o output ~/ma/development/open62541
But it fails with following error message:
pi#raspberrypi:~/ma/dockerVersion/docker-deb-builder $ sudo ./build -i docker-deb-builder:18.04 -o output ~/ma/dockerVersion/open62541
Running docker:
docker run -it -it -v /home/pi/ma/development/open62541:/source-ro:ro -v /home/pi/ma/development/docker-deb-builder/output:/output -v /home/pi/ma/development/docker-deb-builder/build-helper.sh:/build-helper.sh:ro -e USER=0 -e GROUP=0 --rm docker-deb-builder:18.04 /build-helper.sh
Unable to find image 'docker-deb-builder:18.04' locally
docker: Error response from daemon: pull access denied for docker-deb-builder, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
What I am trying to accomplish is to run a docker container (with an open62541 server running in it) on my raspberry pi.
Questions:
- How can I solve the problem described above?
- How or where can I integrate my customized open62541 server code?
Background Information / Reproduction Steps
Running the command cat /etc/os-release gives me the following information:
pi#raspberrypi:~/ma/dockerVersion/docker-deb-builder $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Issue 1 - running a container by tag (but not finding it by tag)
Firstly, the error docker: Error response from daemon: pull access denied for docker-deb-builder occurs when you docker run using a image name that cannot be found locally, so it goes off and tries to find docker-deb-builder on hub.docker.com (publicly) and if you go look there are none with that exact name.
The error is basically telling you;
I couldn't find docker-deb-builder locally
I couldn't find docker-deb-builder on hub.docker.com (public)
I want to try hub.docker.com (private) but you are not logged in
So you might first try to build the container and docker tag it with docker-deb-builder so you can then find it locally with the command you provided in this issue.
Issue 2 - building on armv7 (raspberry pi)
The page you linked to has instructions for;
git clone https://github.com/tsaarni/docker-deb-builder.git
Looking at tsaarni/docker-deb-builder on github for the 18.04 image you're targetting i found the Docekrfile and it is using ubuntu:18.04 and you will need to modify this to use ubuntu:18.04#sha256:60a99a670b980963e4a9d882f631cba5d26ba5d14ccba2aa82a4e1f4d084fb1f which is the signature for the armv7.
Might just add, to make sure in case you're not aware, to run on armv7 you must also docker build it on armv7

I just installed docker, but running "hello world" failed, it doesn't download image?

I've just downloaded latest doc on my mac, and docker --version shows
Docker version 17.03.0-ce, build 60ccb22
No problem. Then I tried docker to run hello world, as the user guide:
$docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: EOF.
See 'docker run --help'.
Well it doesn't automatically download the helloworld image for me, seems it met some errors. How to fix it?
Thanks!

Error while running a container using docker

I have installed docker in my machine
I could successfully pull images from the repository and the pulled images are clearly listed when I see the list of images pulled.
The docker service was also started using
sudo service docker start
However, when I try to run the same using the command,
sudo docker run -it ubuntu:12.04
I am getting the following error
docker: Error response from daemon: Container command '/bin/bash' not
found or does not exist..
The issue remains the same for any image that I have tried with
What could be the reason for this issue?
It depends on your version of docker, but check if you have issue 23411, where adding a workdir is needed:
sudo docker run --workdir /var -it ubuntu:12.04
There seem to be some recent bug in start.go, and a PR in progress.

Docker daemon does not start or restart

I am on ubuntu 14.04 and I also upgrade docker to recent version.
Whenever I do a sudo /etc/init.d/docker start I get a successful pid as follows,
docker start/running, process 16267
When I view the PID details, I see nothing -
ps -p 16267
PID TTY TIME CMD
And when I try to do a sudo docker version I see the below -
Client API version: 1.16
Go version (client): go1.2.1
OS/Arch (client): linux/amd64
2015/01/10 10:30:49 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
The output of sudo docker -d is as follows,
[2015-01-12T21:05:59.889680188+08:00] [info] docker daemon: ; execdriver: native; graphdriver:
[2015-01-12T21:05:59.889800519+08:00] [83736c52] +job serveapi(unix:///var/run/docker.sock)
[2015-01-12T21:05:59.895688816+08:00] [info] Listening for HTTP on unix (/var/run/docker.sock)
[2015-01-12T21:05:59.904409095+08:00] [83736c52] +job init_networkdriver()
[2015-01-12T21:05:59.932947471+08:00] [83736c52] -job init_networkdriver() = OK (0)
[2015-01-12T21:05:59.933137366+08:00] [fatal] log.go:64 Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.com/contributing/devenvironment for official build instructions.
I am not sure what is going wrong. Has anyone overcome similar issues? I am not even sure when I should check for more logs on this. Any directions on this will be helpful.
Thanks
You probably have a corrupted install.
Uninstall docker
Make sure you don't have a dockerinit (updatedb / locate dockerinit) -> delete it
Reinstall docker
This should do the trick.
If not, try uninstalling docker again and try with binaries from https://docs.docker.com/installation/binaries/.

Resources