With --user-remap cannot docker-compose up data container

hello,
I’v activated --user-remap=default option.
I’ve got a data container
MysqlDataContainer:
image: mysql
entrypoint: /bin/bash
volumes:

  • ./mysql/:/var/lib/mysql

docker-compose up failed:
ERROR: for MysqlDataContainer Container command ‘/bin/true’ could not be invoked.

docker version
Client:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:17:17 2016
OS/Arch: linux/amd64

Server:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:17:17 2016
OS/Arch: linux/amd64

I can run a basic container without problem with a user "rootcont"
root@debian8:~/allmydcomp/gogs# docker run -d debian /bin/bash -c "while true; do echo hello world; sleep 1; done"
e3c24b9243a3533a79a6f7453650f0705686757202898e521a6b25862aa06b2f
root@debian8:~/allmydcomp/gogs#
root@debian8:~/allmydcomp/gogs#
root@debian8:~/allmydcomp/gogs# ps -ef|grep while
rootcont 2152 2134 0 10:32 ? 00:00:00 /bin/sh -c while true; do echo hello world; sleep 1; done

thanks for your help

The mysql Docker image has a mandatory environment variable MYSQL_ROOT_PASSWORD, which must be specified in the configuration file.

thanks for your answer ,
but docker-compose works well without and it’s a data container --user-remap

The problem is relative to usernamespace

I understand that the container cannot access to a host volume with username space enabled
MysqlDataContainer:
image: registry.iutbeziers.fr/mariadbiut
volumes:

- ./mysql/:/var/lib/mysql

- /var/lib/mysql # this work