The container will start, execute the hostname command, then exit. In this step we’re going to start a new container and tell it to run the hostname command. Run a single task in an Alpine Linux container In this section you’ll try each of those options and see how Docker manages the workload.
There are different ways to use containers.
Task 1: Run some simple Docker containers If you do not have a DockerID (a free login used to access Docker Hub), please visit Docker Hub and register for one. This will make a copy of the lab’s repo in a new sub-directory called linux_tweet_app. Use the following command to clone the lab’s repo from GitHub (you can click the command or manually type it). You will need all of the following to complete this lab:
DOCKER RUN IMAGE DEFAULT ATTACHED HOW TO
Finally, we’ll look at how to use bind mounts to modify a running container as you might if you were actively developing using Docker.ĭifficulty: Beginner (assumes no familiarity with Docker) We’ll start by running some simple containers, then we’ll use a Dockerfile to build a custom app. In this lab, we will look at some basic Docker commands and a simple build-ship-run workflow.