In this guide we'll use [dradispro.old] to refer to the IP address of your existing Dradis VM and [host] to refer to the hostname of your new Docker host.
First of all, you will need to prepare your new host for deployment. On the host where you are going to deploy your Docker instance, before deploying it, create a directory called init.
Export your database from the existing VM:
$ ssh dradispro@[dradispro.old] -- 'dp-export-mysql' > dradis-mysql-backup.sql
Open dradis-mysql-backup.sql in a text editor, add the following two lines at the very top of the file, and save:
CREATE DATABASE IF NOT EXISTS dradis_production; USE dradis_production;
Copy the file into the init/ directory on your new Docker host:
$ scp dradis-mysql-backup.sql deployer@[host]:init/
Your data will be imported automatically into the database container on first startup.
Note: The init/ directory is only processed on the very first startup of the database container. If the container has already been started once (even briefly), placing files in init/ will have no effect. In that case, import the SQL file manually after the stack is running: docker exec -i db mysql -u root -p dradis_production < dradis-mysql-backup.sql
Alternatively, if you started the new container but did not really do anything with it, i.e. the new container has no data you mind losing, you could simply remove the container and volume, and run docker compose up again. That would revert the instance to its original state, and load anything in init/.
This step is the same as deploying a fresh, blank Dradis Docker instance. The only difference is that with your .sql file in the init folder, your instance will be created with the data migrated from your VM instance.
curl -fsSL https://get.dradis.com | /bin/bash
You'll need to migrate your configuration values from the VM to the new container environment.
Copy the migration script into the app container:
$ docker cp migrate_configuration.rb app:/dradispro
Run the migration script:
$ docker exec -i app bundle exec rails runner migrate_configuration.rb
Copy the dp-import script into the app container:
$ docker cp pro/dp-import app:/dradispro
Run each of the following import commands in turn:
$ ssh dradispro@[dradispro.old] 'dp-export-storage' |\
docker exec -i app /dradispro/dp-import "storage"
$ ssh dradispro@[dradispro.old] 'dp-export-templates' |\
docker exec -i app /dradispro/dp-import "templates"
$ ssh dradispro@[dradispro.old] 'dp-export-attachments' |\
docker exec -i app /dradispro/dp-import "attachments"
If you had Gateway installed on your VM, also run:
$ ssh dradispro@[dradispro.old] 'dp-export-themes' |\
docker exec -i app /dradispro/dp-import "themes"
If any users on your instance has custom avatars, also run:
ssh dradispro@[dradispro.old] 'tar -cf - -C /opt/dradispro/dradispro/shared avatars' |\
docker exec -i app tar -xpf - -C /dradispro/storage/public
Next help article: Migrating from one Docker instance to another →
Loading form...
Your email is kept private. We don't do the spam thing.