Difficulty: Beginner
Estimated Time: 10 minutes

Learning Docker

This is a good primer on how to create a source file for your Docker image in GITHUB and publish it to DOCKER for use

As a last step, use your browser to login to your DOCKER account at:


Once you successfully sign in you should be able to see your image

Docker Image Creation to Publishing (storing code in GitHub)

Step 1 of 8

Setup Environment

To start creating our docker image let's setup some environment variables so this learning exercise can be applied to most docker projects

  1. Setup the name of the docker image you will be working on:

    export DOCKER_IMAGE_NAME=NAME_OF_YOUR_DOCKER_IMAGE (e.g. sample-katacoda)

  2. Setup your username and email as required for github:

    A. export GITHUB_USER=YOUR_GITHUB_USERNAME (e.g. user123)

    B. export GITHUB_EMAIL=YOUR_GITHUB_EMAIL (e.g. [email protected])

    C. Set your github config and verify it:

    git config --global user.name ${GITHUB_USER} && git config --global user.email ${GITHUB_EMAIL} && git config --list | grep -e 'user'

  3. Setup your username for docker:

    A. export DOCKER_USER=YOUR_DOCKER_USERNAME (e.g. user123)

  4. Check your settings

    set | grep -E 'DOCKER|GITHUB'