1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Docker

Connected

Exercise

Working with downloaded files

Your previous image worked, and you were able to finalize your pipeline python code! You can now create the next version of your image. Let's create a Dockerfile from scratch, add instructions and then build it.

Instructions 1/4

undefined XP
  • 1
    • Create a file called Dockerfile in the current working directory.
  • 2
    • Add the first instruction to the Dockerfile so that it will build on top of the ubuntu image.
    • Add instructions to the Dockerfile so that it runs apt-get update and apt-get install -y python3 curl unzip.
  • 3

    Add instructions to the Dockerfile to:

    • Download the zip file from https://assets.datacamp.com/production/repositories/6082/datasets/31a5052c6a5424cbb8d939a7a6eff9311957e7d0/pipeline_final.zip to /pipeline_final.zip.
    • Unzip the file
    • And remove the zip
    • You can use three separate instructions or make it a single instruction to keep your image smaller.
  • 4
    • Using the terminal, run the command to build an image called pipeline from the Dockerfile in your current working directory.