Giter VIP home page Giter VIP logo

docker-app's Introduction

Docker-app

docker-app is a web-app built in flask to list containers/images and allow operations like add-image, run-container, stop-container.

Features:

  • List all containers
  • List all available images
  • Information page for each container
  • Information page for each image
  • Stop a running container
  • Delete an existing image
  • Add a new image
  • start a new container [It asks for the command to run and ports to expose]
  • To look at logs of a running container

Technology used

  • Python
  • Flask
  • AWS Cloud
  • Terraform
  • Docker

Local Setup/Installation

  • Terraform installed on your workstation with proper aws IAM credentials/access
  • To run the app on workstation
    • Install docker on your workstation
    • Run after building the docker image manually:
      • Pull this repository (To build the image or for changing the source)
      • Build the docker image by running from project root directory: docker build -t ajeetkhan/docker-app:latest .
      • Run the image: docker run -d -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock ajeetkhan/docker-app:latest
    • Run directly by pulling it from docker hub:
      • Pull the image: docker pull ajeetkhan/docker-app:latest
      • Run the image: docker run -d -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock ajeetkhan/docker-app:latest
    • Access the app on localhost:5000

Deploy On AWS EC2 Instance

  • Make sure you have terraform installed on your workstation
  • Pull terraform script from here
  • Change VPC CIDR, REGION and other variables in variables.tf file
  • Run terraform plan to check what all resources will be created
  • Run terraform apply to actually create the resources
  • On successfull creation of EC2 instance, hit public IP of the instance in browser to access the app
  • If app isn't running on the public IP, check the logs of userdata in instance at /var/log/userdata.log
  • Add a DNS entry of your domain poiniting to the public IP of instance

Assumptions

  • The docker host/daemon, docker-app is connecting to, is running on the same host.

Future Enhancement

  • Allow docker-app to connect to remote docker daemon/host
  • Add feature for streaming of container logs
  • Show status of image getting pulled

Contributing

  • TBD

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

ISC

docker-app's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.