Skip to main content
  1. Create a parent folder for your Mage project (e.g. my_team).
  2. Change directory (e.g. cd my_team) into the parent folder and start Mage locally: For example:
    For more examples, read the setup guide.
  3. Once you’re done developing, copy the contents of the this Dockerfile template and paste it into a new Dockerfile located in the parent folder of your Mage project (e.g. my_team/Dockerfile). Replace all instances of the string [project_name] with your project name. For example, if your project name is demo_project, then your Dockerfile will look like this: The contents of your Dockerfile are:
  4. Your current folder structure should look like this:
  5. Build a custom Docker image using mageai/mageai:latest as the base and using the newly created Dockerfile as the additional set of instructions:
    Change mageprod to any other name. You’ll need this tag name when deploying to production in the cloud.
  6. To test the new image works, run the following command:
  7. Open your browser and go to http://localhost:6789/
    1. You should see all your pipelines there.
    2. Changing the contents of files won’t change the contents on your local file system because all your code was packaged together within the Docker image (this is intentional).
  8. The next steps depends on your deployment method. If you are using Terraform, then you’ll need to use the previously tag name (e.g. mageprod) when pushing a Docker image to a remote Docker registry.