When creating a container, errors from docker are not properly reported to the user
When I create a container with a dupe name, Docker properly responds with a 409 to let me know that it conflicts with another container. However, we're only showing "500 server error".
❯ hammer -u admin -p changeme docker container create --name crafty_turing \ --repository-name centos --tag latest --compute-resource DockerCP --command bash Docker container created ❯ hammer -u admin -p changeme docker container create --name crafty_turing \ --repository-name centos --tag latest --compute-resource DockerCP --command "ping google.com" Could not create the container: Error: 500 Internal Server Error
We need to show a user friendly error.
Updated by David Davis over 8 years ago
Adam, yea. I fixed the duplicate name issue by adding a check in the foreman code. You can probably get around this by manually creating the container from the docker CLI. Here are some other possibilities:
- A container with name length greater than max?
- A container with invalid options such as an invalid port?
- Have not enough disk space
Basically the issue here is that Docker is returning an error and we're not logging it or displaying it to the user.
Updated by Daniel Lobato Garcia over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman-docker|ef3feba424601cb70a7f25fd8457d885e8a023b2.