https://github.com/thiagoloureiro/nginx-non-root
https://github.com/thiagoloureiro/nginx-non-root
Last synced: about 21 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/thiagoloureiro/nginx-non-root
- Owner: thiagoloureiro
- Created: 2025-01-23T02:41:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-23T02:46:33.000Z (5 months ago)
- Last Synced: 2025-01-23T03:27:08.292Z (5 months ago)
- Language: Dockerfile
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NGINX Docker Image (Non-Root)
[](https://dev.azure.com/thiagoguaru/AlertHawk/_build/latest?definitionId=-1)
This repository provides a lightweight, non-root NGINX image built on the `nginx:alpine` base image. It serves content securely by running as a non-root user.
## Features
- Based on the minimal `nginx:alpine` image for reduced size and faster performance.
- Runs as a non-root user (`nginx`) to enhance security.
- Configurable through a custom `nginx.conf` file.
- Exposes the service on port `8080`.---
## Dockerfile Highlights
1. **Ownership and Permissions:**
- Ensures key directories and files are owned by the `nginx` user.
- Sets appropriate permissions for security.2. **Custom Configuration:**
- Uses a custom NGINX configuration file (`nginx.conf`).3. **Non-Root User:**
- The image runs as the `nginx` user for all operations.---
## Usage
### Build the Image
```bash
docker build -t custom-nginx:non-root .