---
description: >-
  In this section you will learn about how you can create a docker image of the
  project.
---

# Create a Docker Image

Here are the step by step instructions to make a docker image.

**1. Install docker container in your machine.**

{% embed url="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-getting-started" %}

**2**. **Create a** `Dockerfile` **under the project file.**

{% code title="Dockerfile" %}
```
# You should always specify a full version here to ensure all of your developers
# are running the same version of Node.
FROM node:8.11.2

# The base node image sets a very verbose log level.
ENV NPM_CONFIG_LOGLEVEL warn

# Copy all local files into the image.
COPY . .

# install
RUN npm install

# Build for production.
RUN npm run build

# Set the command to start the node server.
CMD serve -s dist

# Tell Docker about the port we'll run on.
EXPOSE 5000
```
{% endcode %}

**2.** **Build your image by running** `docker build -t reactify-docker .` .

**3. Verify that it’s working by running** `docker run -it --rm -p 5000:5000 --name reactify-docker reactify-docker`

Check more details about it.&#x20;

{% embed url="https://medium.com/ai2-blog/dockerizing-a-react-application-3563688a2378" %}
