Skip to content

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 80

Or with a config file:

basepod.yaml:

yaml
name: myapp
image: nginx:alpine
port: 80
bash
bp deploy

Databases

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/data

MySQL

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/mysql

MariaDB

basepod.yaml:

yaml
name: mariadb
image: mariadb:11
port: 3306

env:
  MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
  MARIADB_DATABASE: mydb

volumes:
  - mariadbdata:/var/lib/mysql

MongoDB

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/db

Redis

basepod.yaml:

yaml
name: redis
image: redis:7-alpine
port: 6379

volumes:
  - redisdata:/data

With password:

yaml
name: redis
image: redis:7-alpine
port: 6379
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]

volumes:
  - redisdata:/data

Search & 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: 1024m

Meilisearch

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_data

Typesense

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:/data

Message 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/rabbitmq

Management UI available on port 15672.


NATS

basepod.yaml:

yaml
name: nats
image: nats:2-alpine
port: 4222

Monitoring

Grafana

basepod.yaml:

yaml
name: grafana
image: grafana/grafana:latest
port: 3000

env:
  GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}

volumes:
  - grafanadata:/var/lib/grafana

Prometheus

basepod.yaml:

yaml
name: prometheus
image: prom/prometheus:latest
port: 9090

volumes:
  - prometheusdata:/prometheus
  - ./prometheus.yml:/etc/prometheus/prometheus.yml

Uptime Kuma

basepod.yaml:

yaml
name: uptime-kuma
image: louislam/uptime-kuma:1
port: 3001

volumes:
  - uptimedata:/app/data

CMS & 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/html

Ghost

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/content

Strapi

basepod.yaml:

yaml
name: strapi
image: strapi/strapi:latest
port: 1337

env:
  DATABASE_CLIENT: sqlite
  DATABASE_FILENAME: .tmp/data.db

volumes:
  - strapidata:/srv/app

Dev Tools

Gitea

basepod.yaml:

yaml
name: gitea
image: gitea/gitea:latest
port: 3000

env:
  USER_UID: 1000
  USER_GID: 1000

volumes:
  - giteadata:/data

n8n

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/.n8n

Portainer

basepod.yaml:

yaml
name: portainer
image: portainer/portainer-ce:latest
port: 9000

volumes:
  - portainerdata:/data

Adminer

basepod.yaml:

yaml
name: adminer
image: adminer:latest
port: 8080

env:
  ADMINER_DEFAULT_SERVER: postgres

Storage

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:/data

Console 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/plex

GitHub Container Registry

bash
bp deploy myapp --image ghcr.io/username/image:tag

Google Container Registry

bash
bp deploy myapp --image gcr.io/project/image:tag

Private Registries

Configure credentials in server settings, then:

bash
bp deploy myapp --image registry.example.com/image:tag

Image Tags

Choose the right tag for your needs:

Tag TypeExampleUse Case
Specific versionnginx:1.25.3Production stability
Minor versionpostgres:16Auto-patch updates
latestredis:latestDevelopment only
alpinenode:20-alpineSmaller image size
slimpython:3.12-slimReduced dependencies

Configuration Options

Environment Variables

yaml
name: myapp
image: myimage
env:
  KEY: value
  SECRET: ${SECRET}  # From shell environment

Volumes

yaml
name: myapp
image: myimage
volumes:
  - data:/app/data
  - uploads:/app/uploads

Resource Limits

yaml
name: myapp
image: myimage
resources:
  memory: 512m
  cpus: 1.0

Custom 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:latest

Or update to a new version:

bash
bp deploy myapp --image nginx:1.26

Released under the MIT License.