paint-brush
Beginner's Guide to Docker Image Deployment With Aptible (and Get a Free Shirt!)by@bennykillua
133 reads

Beginner's Guide to Docker Image Deployment With Aptible (and Get a Free Shirt!)

by killuaDecember 12th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Aptible is a Platform-as-a-Service (PaaS) provider that allows users to deploy applications and APIs without worrying about any infrastructure or deployment complexities. With Aptible, you just need to worry about your codes, build awesome functionalities, and make your customers happy. One of my favorite features of this platform is the Docker image deployment. With this, you can automate your process and push updates in a matter of minutes.
featured image - Beginner's Guide to Docker Image Deployment With Aptible (and Get a Free Shirt!)
killua HackerNoon profile picture

Have you ever wished you could deploy your codes with just a few clicks without worrying about server configuration, environment, and infrastructure headaches? Well, that's exactly what Aptible enables you to do.


Aptible is a Platform-as-a-Service (PaaS) provider that allows users to deploy applications and APIs without worrying about any infrastructure or deployment complexities.


With Aptible, you just need to worry about your codes, build awesome functionalities, and make your customers happy. Aptible takes care of everything from application provisioning to orchestration, even with limited prior knowledge. This doesn’t mean you can’t customize your infrastructure environment on Aptible to meet your needs.


One of my favorite features of this platform is the Docker image deployment. This feature lets you seamlessly deploy your pre-built Docker images to encapsulate application code and dependencies across environments. With this, you can automate your process and push updates in a matter of minutes.


In this guide, I share what I’ve learned to help you get up and deploy through Aptible’s Docker image deployment.


In this guide, you will learn:

  • How to set up your Aptible’s environment and app quickly and hassle-free.
  • How to deploy your containerized apps with Aptible
  • More advanced Aptible’s functionalities.

Prerequisites

Before you get started with this guide, you will need the following prerequisites:

Setting Up Your Aptible’s Environment and App Quickly and Without Any Hassle

The Aptible CLI helps you manage your Aptible resources—create, modify, deploy, scale, and delete Aptible resources—directly from the command line.


After Installing the Aptible CLI, you will need to log into Aptible via the CLI using the command below:


aptible login


This will prompt you to input your email and password for authentication.



Next, you will need to create your environment and app using the syntax below. Remember to replace  <app name> and <environment name> with the name of your environment and app.


Alternatively, you can create your Aptible app and environment on the Aptible dashboard.


You can do this by creating and naming your environment. You will be on the shared resource plan if you're on a free trial. After creating your environment, you can simply create and name your app.



Right on the dashboard, you must add your SSH key public key. If you don’t have one, you can generate one using the command below.


ssh-keygen -t ed25519 -C "[email protected]"


You can also learn more about the SSH key through these GitHub docs. As you can see, you can do most of your work right in the Aptible dashboard.

Deploying Your Containerized Apps With Aptible

Before you can deploy directly from the Docker image, you will need to build your Docker image locally.


Now, let’s start by running the commands below to your Docker image to your app:


aptible deploy --app "$APP_HANDLE" --docker-image "$DOCKER_IMAGE"


Remember to replace "$APP_HANDLE"  and "$DOCKER_IMAGE" with your app name and Docker Image.



aptible deploy --app "apptest" --docker-image "nginx:latest"


This will deploy your Docker image to your Aptible app.


As you can see, deploying directly from a Docker image is quite simple. Now, let's take a look at some other functions of Aptible.


More Advanced Aptible’s Functionalities

While Aptible deployment is undeniably seamless, it's just the tip of the iceberg. Aptible offers various other functionalities that you can explore to streamline your development journey.


These functionalities include log visibility, effortlessly adding or removing resources by scaling your applications to adapt to fluctuating demands, and de-provisioning your apps with just a click.


Another is the ability to bring your app to the world by simply creating and managing endpoints and enabling seamless communication with external services.





The Aptible documentation details all about the functionalities and possibilities of Aptible.

Deploy With Apitble? Share It and Get a Shirt!

You successfully deployed to Aptible directly from the Docker image in this guide. By following the steps here, you can deploy your code and containerized apps to the Aptible platform.


Of course, we just scratched the surface of what can be done with Apitble. For example, you can explore the Aptible Terraform to manage your resources instead of using the Aptible Dashboard or CLI.


So, explore this amazing and powerful platform, deploy an app, and get a shirt!