A Dockerfile is a text file that instructs Docker how to create an image of your
application's environment. An image contains everything you want and
need when running application, such as files, packages, and tools.
The following is the Dockerfile for this project.
```dockerfile
FROM nginx:stable-alpine3.17-slim
WORKDIR /usr/share/nginx/html
COPY . .
```
This Dockerfile defines an image that serves static content using Nginx from an
Alpine Linux base image.
## Develop with Compose
Docker Compose is a tool for defining and running multi-container Docker
applications. With Compose, you use a YAML file to configure your application's
services, networks, and volumes. In this case, the application isn't a
multi-container application, but Docker Compose has other useful features for
development, like [Compose Watch](/manuals/compose/how-tos/file-watch.md).
The sample application doesn't have a Compose file yet. To create a Compose
file, in the `TensorJS-Face-Detection` directory, create a text file named
`compose.yaml` and then add the following contents.
```yaml
services:
server:
build:
context: .
ports:
- 80:80
develop:
watch:
- action: sync
path: .
target: /usr/share/nginx/html
```
This Compose file defines a service that is built using the Dockerfile in the
same directory. It maps port 80 on the host to port 80 in the container. It also
has a `develop` subsection with the `watch` attribute that defines a list of
rules that control automatic service updates based on local file changes. For
more details about the Compose instructions, see the
[Compose file reference](/reference/compose-file/_index.md).
Save the changes to your `compose.yaml` file and then run the following command to run the application.
```console
$ docker compose watch
```
Once the application is running, open a web browser and access the application
at [http://localhost:80](http://localhost:80). You may need to grant access to
your webcam for the application.
Now you can make changes to the source code and see the changes automatically
reflected in the container without having to rebuild and rerun the container.
Open the `index.js` file and update the landmark points to be green instead of
blue on line 83.
```diff
- ctx.fillStyle = "blue";
+ ctx.fillStyle = "green";
```
Save the changes to the `index.js` file and then refresh the browser page. The
landmark points should now appear green.