Intro to Docker

Connecting to a Docker Container interactively

Objectives

  • Create a docker container
  • Connect to the docker container interactively

Create a docker container

Two steps

docker pull

docker run

Allows us to download a Docker image from Docker Hub

Creates a container from an image

Connect to the docker container interactively

The Run Command

docker run -it ubuntu /bin/bash

Connect to the docker container interactively

Lets break it down

docker run

Base command to create a container from an image

-i

Interactively attach to the container

-t

Attach the terminal to the container

ubuntu

The image to create the container from

/bin/bash

Command to run

Objectives

  • Create a docker container
  • Connect to the docker container interactively

Stretch

  • Create a Docker container of a language of your choice and explore around

You can find docker images at https://hub.docker.com/

running a docker image interactively

By Brooks Patton

running a docker image interactively

This slide deck is for a short youtube video showing how to connect into a docker image interactively.

  • 958