Docker: Error pulling image, executable file not found in $PATH - docker

I'm trying to pull some image, and have strange error:
sudo docker pull wnameless/oracle-xe-11g
Pulling repository wnameless/oracle-xe-11g
f8d224b82290: Error pulling image (latest) from wnameless/oracle-xe-11g, Untar exit status 1 exec: "xz": executable file not found in $PATH found in $PATH ror downloading dependent layers
2014/11/28 23:08:26 Error pulling image (latest) from wnameless/oracle-xe-11g, Untar exit status 1 exec: "xz": executable file not found in $PATH
Strange, but Ubuntu image works fine
sudo docker run -i -t ubuntu
System version:
Linux Mint 17 Qiana
Kernel version 3.13.0

Issue 9327 was introduced in 1.3.2 and should be fixed in 1.4.0, so 1.3.1 should be fine (beside lack of security fixes which caused this regression). If you creating images with mkimage.sh in 1.3.2 next fix will help:
$ > git diff
diff --git a/contrib/mkimage.sh b/contrib/mkimage.sh
index cd2fa74..fda16ab 100755
--- a/contrib/mkimage.sh
+++ b/contrib/mkimage.sh
## -71,7 +71,7 ## nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
-tarFile="$dir/rootfs.tar.xz"
+tarFile="$dir/rootfs.tar.bz2"
touch "$tarFile"
(
## -82,7 +82,7 ## touch "$tarFile"
echo >&2 "+ cat > '$dir/Dockerfile'"
cat > "$dir/Dockerfile" <<'EOF'
FROM scratch
-ADD rootfs.tar.xz /
+ADD rootfs.tar.bz2 /
EOF
# if our generated image has a decent shell, let's set a default command

As result, this problem was only in latest version of Docker (lxc-docker package, version > 1.3.x). I have removed this package, and install docker.io package (v. 1.0.1). Now everything is fine.

Related

How to install docker correctly in ubuntu 22.04 is it possible at this time?

I am following the docker installation tutorial in ubuntu: https://docs.docker.com/desktop/linux/install/ubuntu/
And when I try this step: sudo apt install ./docker-desktop-4.8.1-amd64.deb I am getting the next error: E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
Not sure what that means or if I am missing something.
E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
I also tried with:
curl https://desktop-stage.docker.com/linux/main/amd64/74134/docker-desktop.deb --output docker-desktop.deb
sudo apt install ./docker-desktop.deb
And got the error:
E: Invalid archive signature
E: Internal error, could not locate member control.tar{.zst,.lz4,.gz,.xz,.bz2,.lzma,}
E: Could not read meta data from /home/rodolfo/docker-desktop.deb
E: The package lists or status file could not be parsed or opened.
Any ideas?
According to official documentation, and the steps I followed to install docker in Ubuntu 22.04 LTS
Visit the following site https://docs.docker.com/engine/install/ubuntu/
Scroll down until you find the Install using the convenience script section.
You will find the following commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ DRY_RUN=1 sh ./get-docker.sh
the first command will install a shell script with the all needed commands and the other will run this shell script.
You can test the installation by running these commands
$ sudo docker --version
$ sudo docker info
If it looks fine, you now have docker in your machine.
Optional step is to download docker desktop for Ubuntu 22.04
https://docs.docker.com/desktop/linux/install/
MAKE SURE You already installed docker engine before installing docker desktop for Ubuntu
Try moving the DEB file to HOME folder or Change the directory in terminal to the folder where the file is downloaded
So I had the same problem and the solution was to go to the folder root that I downloaded the deb file in it wish is Downloads for me and I rerun the commend
My issue ended up being Ubuntu 22.04 was installed with wsl version 1.
wsl -l -v
NAME STATE VERSION
Ubuntu-22.04 Running 1
wsl --set-version Ubuntu-22.04 2

could not parse ssh: [default]: stat /tmp/ssh-qpL02JZP5k7x/agent.28198: no such file or directory

AFAIK the error means that there is no file named agent.28198 in the mentioned directory, but upon listing its contents the file (local socket file) is clearly there. What could be the reason for docker's inability to get the socket?
Here is the full command scenario:
$ eval $(ssh-agent -s)
Agent pid 28199
$ ssh-add
Enter passphrase for /home/ubuntu/.ssh/id_rsa:
Identity added: /home/ubuntu/.ssh/id_rsa (/home/ubuntu/.ssh/id_rsa)
$ DOCKER_BUILDKIT=1 docker build --ssh default -t my_image .
could not parse ssh: [default]: stat /tmp/ssh-qpL02JZP5k7x/agent.28198: no such file or directory
$ ls -l /tmp/ssh-qpL02JZP5k7x/
total 0
srw------- 1 ubuntu ubuntu 0 Sep 9 08:50 agent.28198
Docker is installed from snap - that's the culprit. It does not have access to /tmp folder because of that. To remediate, remove the package from snap - sudo snap remove docker and install it via dpkg (link).

installed the docker from binaries + docker startup

we installed the docker from binaries as the following ( according to https://docs.docker.com/engine/install/binaries/ )
wget https://download.docker.com/linux/static/stable/x86_64/docker-17.03.0-ce.tgz
--2020-05-06 20:39:22-- https://download.docker.com/linux/static/stable/x86_64/docker-17.03.0-ce.tgz
Resolving download.docker.com (download.docker.com)... 13.225.249.16, 13.225.249.45, 13.225.249.106, ...
Connecting to download.docker.com (download.docker.com)|13.225.249.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27816900 (27M) [application/x-tar]
Saving to: ‘docker-17.03.0-ce.tgz’
100%[===================================================================================================================================================>] 27,816,900 4.76MB/s in 3.7s
2020-05-06 20:39:26 (7.11 MB/s) - ‘docker-17.03.0-ce.tgz’ saved [27816900/27816900]
now we tar it
tar xzvf docker-17.03.0-ce.tgz
docker/
docker/docker-containerd-ctr
docker/docker-proxy
docker/docker
docker/docker-containerd
docker/dockerd
docker/docker-init
docker/docker-containerd-shim
docker/docker-runc
the files after untar
# ls
docker docker-17.03.0-ce.tgz hsperfdata_root stable
cd docker/
# ls
docker docker-containerd docker-containerd-ctr docker-containerd-shim dockerd docker-init docker-proxy docker-runc
now we need to start the dockerd
but how to start it
we try y
/tmp/docker/dockerd
Failed to connect to containerd. Please make sure containerd is installed in your PATH or you have specified the correct address. Got error: exec: "docker-containerd": executable file not found in $PATH
so where we are wrong here ?
First you need to download and run containerd from containerd,
start it containerd& and then run dockerd &, after that you can try it docker run hello-world
It is not recommended way, better install it from repository with selinux or apparmor profiles.

how to downgrade gitlab-runner or to run with specific version?

After I upgrade gitlab-runner to version 11.11.0 I can't run local jobs, like gitlab-runner exec docker job_setup. Always, I receive an error:
$ gitlab-runner exec docker job_setup
Runtime platform arch=amd64 os=darwin pid=1688 revision=6c154264 version=11.11.0
Running with gitlab-runner 11.11.0 (6c154264)
Using Docker executor with image ubuntu:16.04 ...
Pulling docker image ubuntu:16.04 ...
Using docker image sha256:2a697363a8709093834e852b26bedb1d85b316c613120720fea9524f0e98e4a2 for ubuntu:16.04 ...
Running on runner--project-0-concurrent-0 via HappyMeal2.local...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Cloning repository...
fatal: repository '/Users/rui/(...)/helm-deploy-service-example' does not exist
ERROR: Job failed: exit code 1
FATAL: exit code 1
But with gitlab-runner 11.10.0 works well.
I'm trying to downgrade gitlab-runner with brew install gitlab-runner#11.10.0 but it's not working:
$ brew install gitlab-runner#11.10.0
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.
Error: No available formula with the name "gitlab-runner#11.10.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
How to downgrade gitlab-runner or to run with version 11.11.0?
I found a solution:
I uninstalled the last version that I installed with homebrew
I installed a manual setup of gitlab-runner at version 11.10.0
$ brew uninstall gitlab-runner
$ rm -rf /Users/$(whoami)/Library/LaunchAgents/gitlab-runner.plist
$ sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/v11.10.0/binaries/gitlab-runner-darwin-amd64
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ cd ~
$ gitlab-runner install
$ gitlab-runner start
Posted on behalf of the question asker

Installing packages into ubuntu14.04 docker container

I currently have similar images being built for virtualbox and digital ocean for dev and production (they're using packer and ansible to build). They're using Ubuntu 14.04.
I've created a docker version from the same scripts without any issue. This is going to be for a Gitlab CI environment.
When I come to install packages inside a container I get an error. Potentially to do with broken init systems? Something not running?
My initial command is /sbin/init and I've tried with and without phusion/base-image.
The error is msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'docker-engine'' failed: invoke-rc.d: unknown initscript, /etc/init.d/cgroup-lite not found.
dpkg: error processing package cgroup-lite (--configure):
(Yes, this is going to be a monolithic container rather than single-process and yes, I'm running docker from inside it - I'll be sharing docker.sock to make this work.)
So, I had a look at the code for invoke-rd.d and found this relevant snippet.
# If we're running on upstart and there's an upstart job of this name, do
# the rest with upstart instead of calling the init script.
if which initctl >/dev/null && initctl version | grep -q upstart \
&& [ -e "$UPSTARTDIR/${INITSCRIPTID}.conf" ]
then
is_upstart=1
elif test ! -f "${INITDPREFIX}${INITSCRIPTID}" ; then
## Verifies if the given initscript ID is known
## For sysvinit, this error is critical
printerror unknown initscript, ${INITDPREFIX}${INITSCRIPTID} not found.
if [ ! -e "$UPSTARTDIR/${INITSCRIPTID}.conf" ]; then
# If the init script doesn't exist, but the upstart job does, we
# defer the error exit; we might be running in a chroot and
# policy-rc.d might say not to start the job anyway, in which case
# we don't want to exit non-zero.
exit 100
fi
fi
A combination of docker replacing the init system, the inability to use upstart in an ubuntu docker container and the ubuntu package for cgroup-lite being built for upstart meant dpkg --configure was failing as the service couldn't be started.

Resources