# Dockerize a Weather-App

**Steps included:**

1 Make a folder

2 Clone the repo

3 Make dockerfile

4 Build the image

5 Run

6 Test the project

## **Step-1**

In this step, we will first make a separate folder/directory

```bash
 mkdir project00
 cd project00
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164117156/a2179bc2-7249-47fa-a4c4-8a7c26c7c206.png align="center")

## **Step-2**

In this step, we will clone the git repo in our local

\*\*\*ps: don't forget to go inside the cloned repo \*\*\*\*

```bash
 git clone https://github.com/gauri-abc/Weather-App.git
  cd Weather-App
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164203974/88ff6c80-5299-4ce9-9b68-510f576cde4a.png align="center")

### **Step-3**

In this we will try to make a docker file

```bash
Step-3
In this we will try to make a docker file
```

```bash
FROM node:latest
# Create app directory
WORKDIR /home/gauri/project00/Weather-App

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 3000
CMD [ "npm", "start" ]
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164323158/b9a27eb3-435d-48cf-b747-ede44caa51da.png align="center")

### **Step-4**

In this step, we will make an image

```bash
 docker build -t gauriyadav1504/pro00 .
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164386495/8d708a35-548c-4358-a1f4-e4ec42a61637.png align="center")

### **Step-5**

in this we will run the image

```bash
 docker run -p 3000:3000 -d gauriyadav1504/pro00
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164450928/d389288b-bc3c-4512-bfd8-1d4ebaadb99f.png align="center")

### **Step-6**

NOW TEST THE OUTPUT

TADDDAAAAAAA!!!!!!

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685164482503/dbfbc1f8-4bd1-4e24-ac04-c3781a9356d5.png align="center")

Thank You

E-mail: gaurieyadav15402@gmail.com
