0% found this document useful (0 votes)
7 views14 pages

Cloud Assignment 3

Uploaded by

Shantanu Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views14 pages

Cloud Assignment 3

Uploaded by

Shantanu Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

SCHOOL OF COMPUTER APPLICATION

CLOUD APPLICATION DEVELOPMENT


BCADSN12101

Submitted By:
Name: Shantanu Pandey
Section: BCA DS 16
Roll No: 05
Semester: 2nd

TO

Mr. Nikhil Sharma


Babu Banarasi Das University, Lucknow
BBD City, Ayodhya Road, Lucknow Uttar Pradesh- 226028 Bharat

0|Page
INDEX

S.NO TITLE DATE PAGE NO


1 TEXT TO SPEECH MARCH 10 2024 1 TO 4
2 SPEECH TO TEXT MARCH 10 2024 5 TO 7
3 LANGUAGE TRANSLATOR MARCH 26 2024 8 TO 27
4 DOCKER IMAGE BUILDING APRIL 28 2024 28 TO 39
5

1|Page
DOCKER IMAGE BUILDING (SIMPLE)
STEP 1 – Install DOCKER DESKTOP application
(https://www.docker.com/products/docker-desktop/) and ensure that
you have installed Docker correctly and running on your machine.
Sign-in with your credentials.

STEP 2 – Install VS Code and the official Docker extension from the
VS Code Marketplace.
(https://code.visualstudio.com/docs/containers/overview).

2|Page
STEP 3 – Create a new folder named “Docker” and open
it in VS Code.

STEP 4 – Open the Command Palette (Ctrl+Shift+P) and choose


"Python: Create Environment". Select the appropriate app type
(Python: Flask) and provide the entry point path for your application.

3|Page
STEP 5 – Create a Python file named “app.py” inside a venv folder.

STEP 6 – Write a Python Flask code for providing a localhost for the
application and also write the message which you want to print.

4|Page
STEP 7 – Also create a Docker file named “Dockerfile” inside a venv
folder and also write a Code with connect your “app.py” to Docker
Desktop.

STEP 8 – Open Terminal and get inside the venv folder. Run the
command (pip freeze > requirements.txt) to create
requirements.txt file which
contains all python packages
for your application.

5|Page
STEP 9 – Run the docker image building code which create image in
docker app (docker build -t flask-app .)

STEP 10 – Open Docker Desktop app and you will see that an image
has been build successfully.

6|Page
STEP 11 – Run the image which is build.

STEP 12 – After processing of image, add port to 5000 and run it.

7|Page
STEP 13 – After run the image you will see that your image is running
successfully and it provide you a localhost for your application.

STEP 14 – Click on the link of your localhost and you will see that
your application is running successfully.

8|Page
DOCKER IMAGE BUILDING (LIVE)
STEP 1 – Follow the previous all methods and run the docker image
building code using tag of 01 (docker build -t flask-app:01
.) In this we changes in our code and make it live.

STEP 2 – Check the image is build or not (docker images) And


if build run the container from here (docker run --name my-
app -d --rm -p 5000:5000 flask-app:01), and also check
the status of container (docker ps -a)

9|Page
STEP 3 – After run the image you will see that your image is running
successfully and it provide you a localhost for your application.

STEP 4 – Click on the link of your localhost and you will see that your
application is running successfully.

10 | P a g e
STEP 5 – Make changes in the “app.py” file from ‘hello world!’ to
‘hello world! This is updated file’

STEP 6 – Run the docker image building code using tag of 02


(docker build -t flask-app:02 .)

11 | P a g e
STEP 7 – Check the image is build or not (docker images) And if
build run the container from here (docker run --name my-app -d --
rm -p 5000:5000 flask-app:01), and also check the status of container
(docker ps -a)

STEP 8 - After run the image you will see that your image is running
successfully and it provide you a localhost for your application.

12 | P a g e
STEP 9 – Click on the link of your localhost and you will see that your
application is running successfully.
Now you will see that our image is build successfully and it will
live changes on your localhost.

13 | P a g e

You might also like