Site icon Nabtron

Docker issues & solutions

This post lists several helpful commands to solve common docker issues.

The scenario is mainly a docker running in ubuntu 18.04.

Docker was giving error 502 after running for some time. So we had to:

  1. restart docker by command: service docker restart
  2. compose docker image by command: docker-compose start

But before doing docker-compose, we have to be in the folder containing the docker-compose.yml file.

To find that file, use this command:

find . -name "*file_name*"

In any folder, to list the files in ascending order of last modified date:

ls -latr

Helpful references:

https://www.tecmint.com/install-docker-and-run-docker-containers-in-ubuntu/
https://docs.docker.com/engine/reference/commandline/container_ls/

Others:

To see history of commands run on terminal:

history

Exit mobile version