Docker Images
Deploy pre-built Docker images directly to Basepod without building from source.
Overview
Docker image deployments are ideal for:
- Databases & data stores
- Third-party applications (CMS, monitoring, etc.)
- Pre-built services and tools
- Quick prototyping
Benefits:
- No build step required
- Access to thousands of ready-to-run images
- Easy version management
- Works with any registry
Quick Start
bash
# Create and deploy in one step
bp deploy myapp --image nginx:alpine --port 80Or with a config file:
basepod.yaml:
yaml
name: myapp
image: nginx:alpine
port: 80bash
bp deployDatabases
PostgreSQL
basepod.yaml:
yaml
name: postgres
image: postgres:16-alpine
port: 5432
env:
POSTGRES_USER: admin
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: mydb
volumes:
- pgdata:/var/lib/postgresql/dataMySQL
basepod.yaml:
yaml
name: mysql
image: mysql:8
port: 3306
env:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: mydb
MYSQL_USER: admin
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- mysqldata:/var/lib/mysqlMariaDB
basepod.yaml:
yaml
name: mariadb
image: mariadb:11
port: 3306
env:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: mydb
volumes:
- mariadbdata:/var/lib/mysqlMongoDB
basepod.yaml:
yaml
name: mongodb
image: mongo:7
port: 27017
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
volumes:
- mongodata:/data/dbRedis
basepod.yaml:
yaml
name: redis
image: redis:7-alpine
port: 6379
volumes:
- redisdata:/dataWith password:
yaml
name: redis
image: redis:7-alpine
port: 6379
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
volumes:
- redisdata:/dataSearch & Analytics
Elasticsearch
basepod.yaml:
yaml
name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
port: 9200
env:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
xpack.security.enabled: "false"
volumes:
- esdata:/usr/share/elasticsearch/data
resources:
memory: 1024mMeilisearch
basepod.yaml:
yaml
name: meilisearch
image: getmeili/meilisearch:v1.6
port: 7700
env:
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY}
MEILI_ENV: production
volumes:
- meilidata:/meili_dataTypesense
basepod.yaml:
yaml
name: typesense
image: typesense/typesense:0.25.2
port: 8108
env:
TYPESENSE_API_KEY: ${TYPESENSE_API_KEY}
TYPESENSE_DATA_DIR: /data
volumes:
- typesensedata:/dataMessage Queues
RabbitMQ
basepod.yaml:
yaml
name: rabbitmq
image: rabbitmq:3-management-alpine
port: 5672
env:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
volumes:
- rabbitmqdata:/var/lib/rabbitmqManagement UI available on port 15672.
NATS
basepod.yaml:
yaml
name: nats
image: nats:2-alpine
port: 4222Monitoring
Grafana
basepod.yaml:
yaml
name: grafana
image: grafana/grafana:latest
port: 3000
env:
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
volumes:
- grafanadata:/var/lib/grafanaPrometheus
basepod.yaml:
yaml
name: prometheus
image: prom/prometheus:latest
port: 9090
volumes:
- prometheusdata:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.ymlUptime Kuma
basepod.yaml:
yaml
name: uptime-kuma
image: louislam/uptime-kuma:1
port: 3001
volumes:
- uptimedata:/app/dataCMS & Blogs
WordPress
basepod.yaml:
yaml
name: wordpress
image: wordpress:php8.3-apache
port: 80
env:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: ${WP_DB_PASSWORD}
WORDPRESS_DB_NAME: wordpress
volumes:
- wpdata:/var/www/htmlGhost
basepod.yaml:
yaml
name: ghost
image: ghost:5-alpine
port: 2368
env:
url: https://blog.example.com
database__client: sqlite3
volumes:
- ghostdata:/var/lib/ghost/contentStrapi
basepod.yaml:
yaml
name: strapi
image: strapi/strapi:latest
port: 1337
env:
DATABASE_CLIENT: sqlite
DATABASE_FILENAME: .tmp/data.db
volumes:
- strapidata:/srv/appDev Tools
Gitea
basepod.yaml:
yaml
name: gitea
image: gitea/gitea:latest
port: 3000
env:
USER_UID: 1000
USER_GID: 1000
volumes:
- giteadata:/datan8n
basepod.yaml:
yaml
name: n8n
image: n8nio/n8n:latest
port: 5678
env:
N8N_BASIC_AUTH_ACTIVE: "true"
N8N_BASIC_AUTH_USER: admin
N8N_BASIC_AUTH_PASSWORD: ${N8N_PASSWORD}
volumes:
- n8ndata:/home/node/.n8nPortainer
basepod.yaml:
yaml
name: portainer
image: portainer/portainer-ce:latest
port: 9000
volumes:
- portainerdata:/dataAdminer
basepod.yaml:
yaml
name: adminer
image: adminer:latest
port: 8080
env:
ADMINER_DEFAULT_SERVER: postgresStorage
MinIO
basepod.yaml:
yaml
name: minio
image: minio/minio:latest
port: 9000
command: ["server", "/data", "--console-address", ":9001"]
env:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
volumes:
- miniodata:/dataConsole available on port 9001.
Registry Sources
Docker Hub
bash
# Official images
bp deploy myapp --image nginx:alpine
bp deploy myapp --image postgres:16
# Community images
bp deploy myapp --image linuxserver/plexGitHub Container Registry
bash
bp deploy myapp --image ghcr.io/username/image:tagGoogle Container Registry
bash
bp deploy myapp --image gcr.io/project/image:tagPrivate Registries
Configure credentials in server settings, then:
bash
bp deploy myapp --image registry.example.com/image:tagImage Tags
Choose the right tag for your needs:
| Tag Type | Example | Use Case |
|---|---|---|
| Specific version | nginx:1.25.3 | Production stability |
| Minor version | postgres:16 | Auto-patch updates |
latest | redis:latest | Development only |
alpine | node:20-alpine | Smaller image size |
slim | python:3.12-slim | Reduced dependencies |
Configuration Options
Environment Variables
yaml
name: myapp
image: myimage
env:
KEY: value
SECRET: ${SECRET} # From shell environmentVolumes
yaml
name: myapp
image: myimage
volumes:
- data:/app/data
- uploads:/app/uploadsResource Limits
yaml
name: myapp
image: myimage
resources:
memory: 512m
cpus: 1.0Custom Command
yaml
name: myapp
image: myimage
command: ["./custom-entrypoint.sh", "--flag"]Updating Images
Pull the latest version and restart:
bash
bp deploy myapp --image nginx:latestOr update to a new version:
bash
bp deploy myapp --image nginx:1.26