Docker Community Forums

Share and learn in the Docker community.

Docker Image : Web+Database+Redis

Hi Everyone,

I am new to Docker. We have a need to deploy a web site+database+redis on client’s machines so they can run our system OnPrem.

Is there a way to create a single image that our clients can run that would have all three images in one? We are looking for the easiest deploy for our customers.

In our case NGINX,SQL Server/Redis (linux cores)

Or, do we need to give them 3 images that they run?

Thank you

You can use docker-compose - to package all three services together.

services:
  nginx-web:
image: nginx
restart: always
ports:
  - 80:80
  - 443:443
depends_on:
  - db
  - redis
  db:
image: webhippie/mariadb:latest
restart: always
volumes:
  - mysql:/var/lib/mysql
  - backup:/var/lib/backup
  redis:
image: webhippie/redis:latest
restart: always
environment:
  - REDIS_DATABASES=1
volumes:
  - redis:/var/lib/redis
1 Like