https://github.com/alexveebee/dockerfiles
https://github.com/alexveebee/dockerfiles
dockerfile templates
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alexveebee/dockerfiles
- Owner: AlexVeeBee
- Created: 2025-04-29T13:26:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-11T17:46:56.000Z (about 1 year ago)
- Last Synced: 2025-05-11T18:34:34.294Z (about 1 year ago)
- Topics: dockerfile, templates
- Language: Dockerfile
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerfile templates
## Basic dockerfiles to complex
## Building docker files
```bash
docker build -t image_name:tag .
```
To run:
```bash
docker run [options] image_name:tag
# Common options:
# -d, --detach Run container in background
# -p, --publish Publish container's port to the host
# -v, --volume Bind mount a volume
# --name Assign a name to the container
# --rm Remove container when it exits
```
## Using Docker Compose
Docker Compose allows you to define and run multi-container Docker applications.
Example `docker-compose.yml`:
```yaml
services:
web:
build:
context: .
dockerfile: dockerfile
ports:
- "8000:8000"
restart: unless-stopped
db:
image: postgres
environment:
POSTGRES_PASSWORD: example
restart: unless-stopped
```
To run:
```bash
docker compose up -d
```
To build and run:
```bash
docker compose up -d --build
```