Skip to main content

deploying images to

·3 mins is a Platform as a Service (PaaS) enabling developers to deploy and run their applications globally, closer to their users. The platform, notable for its simplicity and user-friendly design, has recently gained popularity. transforms Docker containers into Firecracker VMs and strategically deploys them worldwide. There are a couple of different ways to build and deploy applications on, the most straightforward method involves the flyctl CLI tool. With flyctl, you can effortlessly build and deploy your application using the single command flyctl deploy. However, this article will explore other deployment strategies.

With Continuous Integration (CI) and Continuous Deployment (CD) workflows, you’ll build and push your Docker images to a container registry. This practice facilitates a consistent build process for images and deploying the same image across various environments. This article will show you how to push Docker images to’s container registry for deployment.

Tagging Images #

When building and pushing Docker images to external registries, it’s essential to tag the image with the registry’s URL. For, the container registry URL is Like with other registries, you must include both an image name and a tag. For instance, when using Docker Hub, you tag an image as follows:<dockerimagename>:<tag>

For, the tagging format is:<your-app>:<tag>

The key distinction is that, unlike Docker Hub, where your Docker image name can be arbitrary, with, it must match your application’s name.

You can tag your Docker image using the following Docker command:

❯ docker tag myapp:latest

You can also tag your Docker image on build using the docker build command:

❯ docker build -t .

Pushing Images #

Pushing Docker images to external registries, like Docker Hub or, involves tagging your image with the registry’s URL, image name, and tag. External registries allow for secure storage and easy distribution of your containerised applications. Before pushing Docker images, you must authenticate with the external registry.

To authenticate with Fly’s container registry, you can use the flyctl CLI tool. The command is as follows:

❯ flyctl auth docker
Authentication successful. You can now tag and push images to{your-app}

This command authenticates your Docker client with’s container registry, allowing you to push images to the registry. This process works by creating an entry in your ~/.docker/config.json file, and for macOS users, it also adds the username and password to your keychain.

Now that you’re authenticated, push it to’s container registry.

❯ docker push

Deploying An Image #

Once a Docker image is pushed to’s container registry, you can deploy it to one of your Fly applications. The flyctl CLI tool provides a simple command to deploy your application using the Docker image from the registry.

❯ flyctl deploy --app myapp \

In future articles and projects, I plan to delve deeper into using manually tagged docker images within CI/CD pipelines. One use case involves pushing and deploying images to ensure consistent builds across multiple environments.