Skip to content

nogibjj/Wenye_Li_Mini_Project_12

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Push Docker Image

Wenye Li Mini Project 12

Requirements

Create a simple python application containerized with a dockerfile. The goal here is to both demonstrate running your application within a docker container (using docker run terminal commands) but to also build a docker image in your CI/CD pipeline which will be pushed to Docker Hub or other container management service.

Application

A simple shopping list application built with Flask and containerized with Docker.

Features

  • Add items to shopping list
  • Remove items from shopping list
  • Docker containerization
  • CI/CD pipeline with GitHub Actions
  • Automated deployment to Docker Hub

Local Setup

  1. Clone the repository:
git clone https://github.com/nogibjj/Wenye_Li_Mini_Project_12.git
cd Wenye_Li_Mini_Project_12
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate
  1. Install dependencies:
make install
  1. Run locally:
make run-local

Docker Usage

  1. Build image:
make build
  1. Run container:
make run
  1. View running containers:
make container_show
  1. Stop container:
make stop
  1. Clean up:
make clean

CI/CD Pipeline

This project uses GitHub Actions for CI/CD:

  • Automatically builds Docker image
  • Pushes to Docker Hub
  • Triggered on push to main branch

Docker Hub

The Docker image is available at:

docker pull wenyeli/shopping-list-app:latest

Commands

  • make install: Install dependencies
  • make run-local: Run app locally
  • make build: Build Docker image
  • make run: Run Docker container
  • make stop: Stop container
  • make clean: Clean up resources
  • make check-port: Check port usage

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published