docker run -dit ubuntu docker exec -it ubuntu bash OR docker run -dit ubuntu bash Above is the basic command. You can add ports and volumes to it as per need.