While you may pull an image directly from Docker Hub, here are our legacy instructions for pushing a Docker image to GCP Artifact Registry:

  1. Create a repository on GCP Artifact Registry by clicking the + CREATE REPOSITORY button.

    • Fill in the Name
    • Choose Docker as the Format
    • Choose any Location type
    • Choose any Encryption
    • Click CREATE
  2. Click on the newly created repository (e.g. mage-docker).

  3. Near the top of the page, click the link SETUP INSTRUCTIONS or read these instructions to set up authentication for Docker.

    • Run the following command in your terminal:

      gcloud auth configure-docker [region]-docker.pkg.dev
      
    • An example command could look like this:

      gcloud auth configure-docker us-west2-docker.pkg.dev
      
  4. Pull the Mage Docker image:

    docker pull mageai/mageai:latest
    
    • If your local workstation is using macOS and a silicon chip (e.g. M1, M2, etc), then run this command instead:

      docker pull --platform linux/amd64 mageai/mageai:latest
      
  5. Tag the pulled Mage docker image or use a previously tagged Docker image you built when following this CI/CD guide:

    • Sample commands if using vanilla Mage Docker image:

      docker tag mageai/mageai:latest [region]-docker.pkg.dev/[project_id]/[repository]/mageai:latest
      
      • An example command could look like this:

        docker tag mageai/mageai:latest us-west2-docker.pkg.dev/materia-284023/mage-docker/mageai:latest
        
    • Sample commands if using previously tagged a custom Docker image using the tag mageprod:latest:

      docker tag mageprod:latest [region]-docker.pkg.dev/[project_id]/[repository]/mageai:latest
      
      • An example command could look like this if you previously tagged your custom Docker image with the tag mageprod:latest:

        docker tag mageprod:latest us-west2-docker.pkg.dev/materia-284023/mage-docker/mageai:latest
        
  6. Push the local Docker image to GCP Artifact Registry:

    docker push [region]-docker.pkg.dev/[project_id]/[repository]/mageai:latest
    
    • An example command could look like this:

      docker push us-west2-docker.pkg.dev/materia-284023/mage-docker/mageai:latest