docs/1.11/03-Tutorials2/06-Deploy-Prisma-Servers/02-Local-(Docker).md
If you want to develop without internet access or simply prefer having everything locally, you can use Docker to run Prisma locally.
You need an up-to-date version of Docker to run Prisma locally. You can find installation instructions for the free Docker Community Edition (CE) on https://www.docker.com/community-edition
Use the interactive init command to bootstrap configuration for your Prisma server:
prisma init
Choose Create new database and pick MySQL or Postgres.
This will create a docker-compose.yml file with a configuration appropriate for running Prisma locally.
Now run docker-compose up -d to start Prisma and and empty database of your selected type.
This will download the open source Docker images for Prisma as well as your selected database. It can take a while, depending on your internet connection.
Now you can deploy a service to the local cluster:
❯ prisma deploy
? Please choose the cluster you want to deploy "demo@dev" to (Use arrow keys)
Deploying service `default` to stage `default` to server `local` 169ms
New versions of Prisma are released every other week. To upgrade, you should first upgrade your CLI:
npm -g install prisma
You can now update your Prisma server by manually changing the docker-compose.yml file to use the latest version of Prisma:
Before:
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.10
After:
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.11
For the change to take effect, run:
docker-compose up -d
Note: It is recommended to export your data before upgrading, using the
prisma exportcommand.
If you run into issues during or after upgrading, you can use normal docker commands to remove your docker containers and start from scratch:
docker ps to list your containersdocker stop [CONTAINER ID] to stop a containerdocker rm [CONTAINER ID] to remove the containerTo learn how you can access your MySQL database directly, follow this tutorial.