Docker Daemon Update

Hi there!

I see that I’m currently running version 1.7.0
root@MyCloudPR4100 root # docker --version Docker version 1.7.0
But docker is currently on 17.09.0

Does anyone know how to update Docker? I see Docker Machine isn’t installed though…

You can build new version using the current docker.

This repo is pretty much what you need. There are instructions for the build process. You can start looking in Makefile.
New version requires different storage option. The one that is compatible with PR4100 is btrfs.

You also need to upgrade the client.

Hi @mkilicar, thank you for helping me out!
I’m still having a few issues… I tired to install moby, but like you said, I need to upgrade the client first (as the docker file fails at Step 1 : ARG Unknown instruction: ARG )
But to upgrade the client I need to use the make file to build it? But make isn’t built in…
I then tried searching for a deb file (as dpkg exists) for docker, but this has lots of dependancies and I cant see to get it to work.
Because when I try to install the iptables dependancies, I get the error:
root@MyCloudPR4100 ubuntu # dpkg --force-depends -i libc6_*deb multiarch-support_*deb libgcc1_*deb Unpacking libc6 (from libc6_2.19-0ubuntu6.13_amd64.deb)... /var/lib/dpkg/info/libc6.preinst: line 18: syntax error: you disabled math support for $((arith)) syntax dpkg: preinst failed, exit code 512

I don’t suppose you have any idea of what I’m doing wrong?

change ARG to ENV, or completely remove it.

You don’t need the package and build on the host. It should be done inside the docker, same as building the server.

Thank you that worked perfectly!

I’m not quite sure how you go about doing that… I was wondering if you have a link to a web page which has any instructions/getting started hints?

make -f docker.Makefile binary

But make isn’t built in to the PR4100, I get:

root@MyCloudPR4100 # make -f docker.Makefile binary
-sh: make: not found

I’m not quite sure how to run it

If you don’t have it ( I have make from optware), just look inside the docker.Makfile file.

docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make binary

You can figure it out $(X) from docker.Makefile.

Thank you very much! I’ve now updated docker… but my next problem is setting up btrfs. Do you know which partition I should mount to /var/lib/docker ? Or how to create a new partition for it?

I ran root@MyCloudPR4100 root # mount -t btrfs /dev/sda3 /var/lib/docker before hand… but I dont think that is right.

As I can’t run any container as I believe it to be how I’ve mounted the btrfs filesystem, I get:
root@MyCloudPR4100 root # docker run hello-world
container_linux.go:262: starting container process caused “process_linux.go:339: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”
ERRO[0016] containerd: start container error=“oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:105: jailing process inside rootfs caused \\\"pivot_root invalid argument\\\"\""\n” id=ae032cd9bf4bef68f2d886ad879f9830c8d16890ca6ef45eadb3e9441c9a9740
ERRO[0016] Create container failed with error: oci runtime error: container_linux.go:262: starting container process caused “process_linux.go:339: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”
ERRO[0017] Handler for POST /v1.30/containers/ae032cd9bf4bef68f2d886ad879f9830c8d16890ca6ef45eadb3e9441c9a9740/start returned error: oci runtime error: container_linux.go:262: starting container process caused “process_linux.go:339: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”
docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused “process_linux.go:339: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”.
ERRO[0001] error waiting for container: context canceled

Thank you for all your help so far!

Did you update the server?
Either use external harddrive formatted with btrfs or create an image file with dd command, format it with btrfs.
Your mount point is correct.

Yeah I have done, annoyingly last night when there was a powercut I found out that nothing is persistent.

Today what I did was download the docker binaries from from here, as per this.

Then, like you said, I created an image file, formatted it, used losetup and mounted it.

I’m not sure if it help, but I get this when starting dockerd:

root@MyCloudPR4100 root # dockerd &
WARN[2017-12-27T19:17:14.959040508Z] could not change group /var/run/docker.sock to docker: group docker not found
INFO[2017-12-27T19:17:14.960215483Z] libcontainerd: new containerd process, pid: 27323
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
INFO[2017-12-27T19:17:15.984219458Z] Graph migration to content-addressability took 0.00 seconds
WARN[2017-12-27T19:17:15.984623396Z] Your kernel does not support kernel memory limit
WARN[2017-12-27T19:17:15.984718225Z] Your kernel does not support cgroup rt period
WARN[2017-12-27T19:17:15.984752538Z] Your kernel does not support cgroup rt runtime
WARN[2017-12-27T19:17:15.984788239Z] Your kernel does not support cgroup blkio weight
WARN[2017-12-27T19:17:15.984821815Z] Your kernel does not support cgroup blkio weight_device
WARN[2017-12-27T19:17:15.984856967Z] Your kernel does not support cgroup blkio throttle.read_bps_device
WARN[2017-12-27T19:17:15.984894705Z] Your kernel does not support cgroup blkio throttle.write_bps_device
WARN[2017-12-27T19:17:15.984928281Z] Your kernel does not support cgroup blkio throttle.read_iops_device
WARN[2017-12-27T19:17:15.984993671Z] Your kernel does not support cgroup blkio throttle.write_iops_device
WARN[2017-12-27T19:17:15.985152326Z] mountpoint for pids not found
INFO[2017-12-27T19:17:15.985643380Z] Loading containers: start.
WARN[2017-12-27T19:17:16.003987964Z] Running modprobe nf_nat failed with message: modprobe: chdir(/lib/modules): No such file or directory, error: exit status 1
WARN[2017-12-27T19:17:16.005938215Z] Running modprobe xt_conntrack failed with message: modprobe: chdir(/lib/modules): No such file or directory, error: exit status 1
WARN[2017-12-27T19:17:16.055331333Z] Could not load necessary modules for IPSEC rules: Running modprobe xfrm_user failed with message: modprobe: chdir(/lib/modules): No such file or directory, error: exit status 1
WARN[2017-12-27T19:17:16.058613790Z] Could not load necessary modules for Conntrack: Running modprobe nf_conntrack failed with message: modprobe: chdir(/lib/modules): No such file or directory, error: exit status 1
INFO[2017-12-27T19:17:16.191794646Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2017-12-27T19:17:16.279017657Z] Loading containers: done.
WARN[2017-12-27T19:17:16.279190576Z] Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory
INFO[2017-12-27T19:17:16.289714093Z] Docker daemon commit=afdb6d4 graphdriver(s)=btrfs version=17.09.0-ce
INFO[2017-12-27T19:17:16.289863273Z] Daemon has completed initialization
INFO[2017-12-27T19:17:16.316717846Z] API listen on /var/run/docker.sock

I’m using version 19.09.0 ce:

root@MyCloudPR4100 root # 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:39:28 2017
OS/Arch: linux/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: false

Is it working now?

No, not yet. And wasn’t yesterday either

Those warnings are normal. What is the error message?

root@MyCloudPR4100 root # docker run hello-world
container_linux.go:265: starting container process caused “process_linux.go:368: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”
ERRO[1936] containerd: start container error="oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \“rootfs_linux.go:105: jailing process inside rootfs caused \\“pivot_root invalid argument\\”\”"
" id=3700e8550372285700faacb6eba85b802da292f89ee80b6b56e77267dc4ebbae
ERRO[2017-12-27T19:53:29.599894918Z] Handler for POST /v1.32/containers/3700e8550372285700faacb6eba85b802da292f89ee80b6b56e77267dc4ebbae/start returned error: oci runtime error: container_linux.go:265: starting container process caused “process_linux.go:368: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”

docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused “process_linux.go:368: container init caused "rootfs_linux.go:105: jailing process inside rootfs caused \"pivot_root invalid argument\""”.
ERRO[0000] error waiting for container: context canceled

The way I’m starting the docker is by modifying the docker_daemon.sh script. May be you can try it.

Yeah, I’ve stopped the default docker by running the docker_daemon.sh stop function - and verified by ps -a |grep docker

That is the above output from the new docker

What is the content of /var/lib/docker

root@MyCloudPR4100 root # ls /var/lib/docker/
btrfs devicemapper image network swarm volumes
builder docker.log init plugins tmp
containers graph linkgraph.db repositories-devicemapper trust

You shouldn’t have devicemapper folder. You probably messed up with default docker.