-
Notifications
You must be signed in to change notification settings - Fork 215
Running with Docker
Ensure that Docker is installed on your system. Docker allows applications to be run in containers, loaded from disk images. Transporter is available as a Docker image from quay.io. To install it, first retrieve the image:
docker pull quay.io/compose/transporter
To run the Transporter command, and assuming that you wish to use the current working directory, invoke the Transporter in a similar fashion to this:
docker run --rm -v $(pwd):/workdir -w /workdir quay.io/compose/transporter:latest transporter init mongodb file
This runs the transporter init mongodb file
command, leaving a pipeline.js
file in the directory.
The --rm
parameter ensures the container is removed after the command has executed. The -v $(pwd):/workdir
binds the container's /workdir directory to the present working directory. The -w /workdir
makes the container set its working directory to /workdir too. That's followed by the name of the image and the transporter command itself.
If you plan on using this style of Transporter launching, we suggest you create a script like this transported.sh
:
#!/bin/sh
docker run --rm -v $(pwd):/workdir -w /workdir quay.io/compose/transporter:latest transporter $@
and can be run simply as:
$ ./transported.sh init mongodb file
Writing pipeline.js...
$
Transporter is open source, built by the good people of Compose (and you, if you want to contribute).