An open API service indexing awesome lists of open source software.

https://github.com/sanju1098/docker

This setup provides a comprehensive solution for deploying a Vite.js React application using Docker and NGINX, ensuring a reliable and efficient production environment.
https://github.com/sanju1098/docker

docker docker-nginx nginx typescript vitejs

Last synced: 11 days ago
JSON representation

This setup provides a comprehensive solution for deploying a Vite.js React application using Docker and NGINX, ensuring a reliable and efficient production environment.

Awesome Lists containing this project

README

          

## 🚀 Docker Container Commands

| Command | Purpose |
|--------------------------------------------------------|--------------------------------------------|
| `docker build -t . ` | Build a docker image |
| `docker run -d -p 8080:80 ` | Run container in detached mode, map ports |
| `docker run --name mycontainer -it bash` | Run interactively with terminal |
| `docker ps` | List running containers |
| `docker ps -a` | List all containers (including stopped) |
| `docker stop ` | Stop a running container |
| `docker start ` | Start a stopped container |
| `docker rm ` | Remove a container |

---

## 📁 Volumes & Logs

| Command | Purpose |
|--------------------------------------------------------|-----------------------------------------|
| `docker logs ` | View logs from container |
| `docker volume ls` | List volumes |
| `docker volume rm ` | Remove a volume |
| `docker exec -it bash` | Access running container terminal |

---

## 🛠️ Common Real-World Docker Commands

```bash
# Build the Docker image
docker build -t my-app .

# Run the container in detached mode and map ports
docker run -d -p 8080:80 my-app

# List running containers
docker ps

# View container logs
docker logs

# Stop a running container
docker stop

# Remove a container
docker rm