How can I fix the permissions using docker on a bluemix volume?

前端 未结 2 1323
忘掉有多难
忘掉有多难 2021-01-18 15:20

In a container, I am trying to start mysqld.

I was able to create an image and push to the registry but when I want to start it, the /var/lib/mysql volu

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 16:15

    You have multiple questions here. I will try to address some. Perhaps that will get you a step further in the right direction.

    --volumes-from is not supported yet in IBM Containers. You can get around that by using the same --volume (-v) option on the first and subsequent containers, instead of using -v on the first container creation command and --volumes-from on the subsequent ones.

    --user option is not supported also by IBM Containers.

    I see your syntax for using --user (I suppose on localhost docker) is not correct. All options for the docker run command must come before the image name. Anything after the image name is considered a command to run inside the container. In this case "--user=mysql" will be considered as a command that the system will attempt to run and fail.

    The last error message you shared shows that there is some file not found in the working dir which causes the app to abort. You may work around that by using a script as the command to run in the container which changes dir to the right location.

提交回复
热议问题