The interesting bit here is at the end. Theenvironmentsection sets an environment variable in the Docker registry container with the path/data. The Docker registry app knows to check this environment variable when it starts up and to start saving its data to the/datafolder as a result. ...