Run Docker with the host directory¶
To run Docker with the host directory:
-
Pull the image:
docker pull perconalab/pmm-server:3.0.0-beta
-
Identify a directory on the host that you want to use to persist PMM data. For example,
/home/user/srv
. -
Run the image:
docker run --detach --restart always \ --publish 443:8443 \ --env PMM_WATCHTOWER_HOST=your_watchtower_host \ --env PMM_WATCHTOWER_TOKEN=your_watchtower_token \ --volume /home/user/srv:/srv \ --network=pmm_default \ --name pmm-server \ perconalab/pmm-server:3.0.0-beta
-
Change the password for the default
admin
user:docker exec -t pmm-server change-admin-password <new_password>
-
Check the WatchTower prerequisites and pass the following command to Docker Socket to start Watchtower:
docker run -v /var/run/docker.sock:/var/run/docker.sock -e WATCHTOWER_HTTP_API_UPDATE=1 -e WATCHTOWER_HTTP_API_TOKEN=your_watchtower_token --hostname=your_watchtower_host --network=pmm_default docker.io/perconalab/watchtower
-
Visit
https://localhost:443
to see the PMM user interface in a web browser. (If you are accessing the docker host remotely, replacelocalhost
with the IP or server name of the host.)
Migrate from data container to host directory¶
To migrate your PMM from data container to host directory, run the following command:
docker cp <containerId>:/srv /target/host/directory
Get expert help¶
If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.