Docker not anymore functional with F26

asked 2017-12-20 10:36:01 -0500

lucodealethea gravatar image

updated 2017-12-20 10:44:01 -0500

Docker is not working anymore with F26 standard config on Fedora.

Nov 12 10:35:54 uburana.maersk.com dockerd-current[26104]: , Code: 125 Nov 12 10:35:54 uburana.maersk.com systemd[1]: docker.service: Unit entered failed state. Nov 12 10:35:54 uburana.maersk.com systemd[1]: docker.service: Failed with result 'protocol'.

Initially, I thought that using Docker on top of a btrfs partition wouldn't work anymore, kernel 4.14.4-200 but

sudo cat /proc/filesystems | grep btrfs

returns btrfs properly

Then using :

journalctl -u docker

returns Status: invalid argument "-" for --insecure-registry: Invalid index name (-). Cannot begin or end with a hyphen

cat /usr/lib/systemd/system/docker.service

shows that EnvironmentFile=/run/containers/registries.conf but to resolve error 125, you will have to update /etc/containers/registries.conf. In reality, required registries.service will first parse YAML config file /etc/containers/registries.conf into /run/containers/registries.conf

Example as below respecting TOML syntax:

# This is a system-wide configuration file used to
# keep track of registries for various container backends.
# It adheres to TOML format and does not support recursive
# lists of registries.

# The default location for this configuration file is /etc/containers/registries.conf.

# The only valid categories are: 'registries.search', 'registries.insecure', 
# and 'registries.block'.

[registries.search]
registries = ['docker.io', 'registry.fedoraproject.org', 'registry.access.redhat.com']

# If you need to access insecure registries, add the registry's fully-qualified name.
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP.
[registries.insecure]
registries = ['localhost:5000']


# If you need to block pull access from a registry, uncomment the section below
# and add the registries fully-qualified name.
#
# Docker only
[registries.block]
registries = ['all']

Previous YAML format (now dysfunctional) was like this:

# This is a system-wide configuration file used to
# keep track of registries for various container backends.
# It adheres to YAML format and does not support recursive
# lists of registries.

# The default location for this configuration
# file is /etc/containers/registries.conf.

# The only valid categories are:
# 'registries', 'insecure_registries'
# and 'block_registries'.
---
registries:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com


# If you need to access insecure registries, uncomment the section below
# and add the registries fully-qualified name. An insecure registry is one
# that does not have a valid SSL certificate or only does HTTP.
insecure_registries:
  -localhost:5000
# If you need to block pull access from a registry, uncomment the section below
# and add the registries fully-qualified name.
block_registries:
  -all
edit retag flag offensive close merge delete