Skip to content

piaxar/docker-101-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker 101 Tutorial

A docker tutorial, taken from @alikhil, sprinkled with Data Science and presented to my colleagues.

Link to presentation.

How to ...

Useful commands

Show all running containers. "ps" stands for process status

docker ps

Show all containers, including stopped.

docker ps

Show all available images.

docker image ls

Writing a Dockerfile

# Source: https://github.com/docker-for-data-science/docker-for-data-science-tutorial/
# EACH COMMAND CREATES A NEW IMAGE LAYER

# Use latest Python runtime as base image
FROM python:3.6.5-alpine3.7

# Set the working directory to /app and copy current dir
WORKDIR /app
COPY ./app /app

# Run hello_world.py when the container launches
CMD ["python", "hello_world.py"]

Building an image

docker build -t my_image

Starting a container

docker run -it my_image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 84.8%
  • Python 15.2%