Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Running with Docker

Dj Walker-Morgan edited this page Mar 29, 2017 · 2 revisions

Quick start

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 command line explained

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.

A Quick Script

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...
$
Clone this wiki locally