This is a Node.js application using Fastify, packaged in a Docker container.
- Docker installed on your machine
To build the Docker image, run the following command in the directory containing the Dockerfile:
sudo docker build -t more-complicated-app:alpine .sudo docker run -it -p 8080:8080 --name my-app --rm --init more-complicated-app:alpineThis command will:
- Run the container interactively (-it)
- Map port 8080 on your host to port 8080 in the container (-p 8080:8080)
- Name the container my-app (--name my-app)
- Remove the container when it exits (--rm)
- Use the tini init system to handle reaping zombie processes (--init)
http://localhost:8080