Dockerfile and accented characters, strange behavior

Hello All,

I’m running a Debian 11 (11.6) VM in VirtualBox 7.0.6 dedicated to run Docker Engine with a couple of containers. I followed the official documentation to install Docker Engine.

Output of docker info:
Server version: 23.0.0
Docker compose v2.15.1

For security reasons I had to replace the distribution kernel (5.10.0-21) by a custom one (6.1.10) compiled by myself designed to fit only the VM emulated hardware and my needs.

I succeeded to create my containers at the end of the VM installation. But later, for a reason I ignore, when I want to rebuild some of them I get the following error message:

[+] Building 0.4s (6/18)
 => [internal] load .dockerignore                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                         0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                    0.0s
 => => transferring dockerfile: 2.47kB                                                                                                                                                  0.0s
 => [internal] load metadata for                                                                                                                 0.0s
 => CACHED [ 1/14] FROM                                                                                                                          0.0s
 => ERROR [internal] load build context                                                                                                                                                 0.0s
 => => transferring context:                                                                                                                                                            0.4s
 => CANCELED [ 2/14] RUN apt-get update && apt-get install -y locales openssh-client wait-for-it sudo nano wget make gcc && rm -rf /var/lib/apt/lists/*  && localedef -i fr_FR -c -f U  0.4s
 > [internal] load build context:
ERROR: failed to solve: Internal: header key "followpaths" contains value with non-printable ASCII characters

Up to now, I had this “é” caracter present in my Dockerfile and in the name of a script copied inside the container. By removing it I 'm able to build again my containers.

I really appreciate if somebody has a clue of what’s going on in my case. I get the same behavoir with the original kernel.I removed all my customisation in /etc/sysctl.conf but the problem is still there.

Thanks in advance for your answers.

BR, François

It looks like a test was added to the sourcecode of Docker two months ago or it was just modified, I haven’t checked, but it could be that you had Docker 20.10 before and now 23.0 doesn’t support that character in some places

Where was that character?

Hello Ákos ,
Köszönöm szépen for your reply. You pinpoint the issue, and gave me a solution !
I downgraded from 23.0.0 to 20.10.23 docker-ce (plus others packages) and I’m able again to build my images with this kind of character “é”.
The character is located in Dockerfile and also in the name of one script I use as ENTRYPOINT parameter.

The downgrade fixed also another problem with the btrfs driver:
ERROR: failed to solve: failed to prepare sha256:bd2fe8b74db65d82ea10db97368d35b92998d4ea0e7e7dc819481fe4a68f64cf as dyehyj2lxeqoejpp8vecqncko: stat /var/lib/docker/btrfs/subvolumes/67357049fc3dd51f40b1bff2d9b1db3e10b4f5a431ee6c55150310bd457aafa7: no such file or directory
This one was scary ! I already started to return to ext4 filesystem. Huge amount of time in my case. Thanks to your reply I can continue with my current VM with btrfs.

1 Like

If the new implementation specifically does not allow non-ascii characters, you might want to use ascii character names instead of sticking to the latest 23.10.x version. At one point you are going to miss out on new features and security fixes otherwise.

This one might be related to:

It would have been nice to see the output of docker info to confirm whether overlay2 was used instead of btrfs, and whether configuring it specifically in /etc/docker/daemon.json would have fixed.

Hello Metin,
Thanks for your reply. It’s not a problem to remove the non-ascii character as I’m aware now of this new behavior. About, the second issue related to btrfs, I will follow your recommandation and upgrade again Docker to 23.0.0. I will remove the line “storage-driver”: “btrfs” in my /etc/docker/daemon.json before to ensure the overlay2 driver is prefered, and update you.
BR, François.

I hope you didn’t test the storage-driver idea for me.

I kind of assume that btrfs was determined as a storage driver before, and after the update might have been replaced by overlay2. I should have asked whether you configured btrfs as storage driver in your daemon.json. Now I know, so imho there is no need to test what I suggested.

Sorry, If I should have wasted your time on this.

Don’t worry Metin, your idea was good. By removing the btrfs driver in daemon.json, the situation is better with Docker 23.0.0. I’m able to build again my images. And as you said Overlay2 driver is prefered to btrfs.

BR, François

Before upgrade:

Context: default
Debug Mode: false
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.10.0-docker)
compose: Docker Compose (Docker Inc., v2.14.1)
scan: Docker Scan (Docker Inc., v0.23.0)

Containers: 11
Running: 11
Paused: 0
Stopped: 0
Images: 32
Server Version: 20.10.23
Storage Driver: btrfs
Build Version: Btrfs v5.10.1
Library Version: 102
Logging Driver: json-file
Cgroup Driver: systemd

After Docker upgrade to the latest release:

Context: default
Debug Mode: false
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.15.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.23.0
Path: /usr/libexec/docker/cli-plugins/docker-scan

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 23.0.0
Storage Driver: overlay2
Backing Filesystem: btrfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2

1 Like