GithubHelp home page GithubHelp logo

weiawesome / docker-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 11 KB

This is easy tutorial to guide using docker and docker-compose.

Dockerfile 5.27% Python 74.40% Shell 10.09% HTML 10.24%
docker docker-compose

docker-demo's Introduction

Docker-Demo

MySQL Demo

docker run --name mysql -e MYSQL_ROOT_PASSWORD=DefaultPassword -e MYSQL_DATABASE=DefaultDb -e MYSQL_USER=DefaultUser -e MYSQL_PASSWORD=DefaultPassword -p 3306:3306 -d mysql:latest

Then you can have the mysql service in localhost:3306
Now you can into the container to have the service.

Flask Demo

pip install -r requirements.txt
python main.py

Then you can connect to the mysql service in localhost:3306
Furthermore, you can into container to check mysql db status equal to flask-demo.

Docker Compose Demo

# Build image of flask-demo
docker build -t flask-demo .

# Start docker-compose service
docker-compose up -d

Now you can see the service in localhost:8080

Demo Image

img.png

Then you can press add 1 or subtract 1 and make influence in mysql container.

docker-demo's People

Contributors

weiawesome avatar

Stargazers

 avatar

Watchers

 avatar

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.