30  Docker Practice

Author
Affiliation

Dr Randy Johnson

Hood College

Published

April 16, 2026

This exercise will pick up where we left off with our DNAanalyzer Streamlit app from the previous exercise.

Instructions

  • Set up a GitHub repo

    • Create a GitHub repository for your app using this GitHub classroom link.

    • Add a README.md file on GitHub

    • Clone your repository to Google Cloud (or your local computer if you have Docker installed)

    • Add your code from the previous exercise and push to GitHub

  • Create a Docker image for your app

    • Use python:3.9-slim for your base

    • Install Streamlit

    • Copy your app into the image

    • Finish with CMD ["streamlit", "run", "DNAanalyzer.py", "--server.port=8080", "--server.address=0.0.0.0"]

    • Build and test your Docker image

      • docker build -t dna-analyzer . (this is the exact command - be sure to include the ” .”)

      • docker run dna-analyzer

    • When you are happy with the app

      • Update the README with instructions for building and running the app
      • Commit and push your Dockerfile and updated README to GitHub

Assignment

Submit a link to your repository and a screenshot of the app running on Google Cloud to Blackboard.