/
/
Getting Started With Docker on a Cloud VM: Step-by-Step Guide
Developers
Why Docker on a Cloud VM?
Docker makes it easy to package, ship, and run applications in lightweight containers. Pairing Docker with a Cloud VM gives you the flexibility of your own server environment and the speed to deploy applications consistently across projects.
Whether you’re testing locally, hosting side projects, or running production workloads, Docker on a Cloud VM combines control, scalability, and affordability.
Step 1: Create a Docker-Ready VM
Log in to your Raff dashboard.
Go to Create VM → Marketplace.
Select Docker 28.1 on Ubuntu 24.04 from the available templates.
Choose your plan (start small — 2 CPU, 4GB RAM is enough for most demos).
Launch your VM and connect via SSH:

Step 2: Verify Docker Installation
Since Raff’s template comes with Docker pre-installed, you don’t need to install it manually. Just confirm the version:
You should see Docker’s version number printed on screen.

Step 3: Run Your First Container
Test Docker with the classic hello-world image:
If it prints a welcome message, Docker is running correctly.
Step 4: Run a Real Application (Example: Nginx)
Spin up a lightweight web server:
Now visit your VM’s public IP in your browser — you should see the Nginx welcome page.

Step 5: Manage Docker Without sudo
To avoid typing sudo
every time:
Log out and back in for changes to take effect.
Step 6: Keep It Clean
List containers:
Stop a container:
Remove a container:

Next Steps
From here, you can:
Deploy your own apps inside containers.
Use Docker Compose to manage multi-container apps.
Experiment with databases, dev environments, or CI/CD pipelines.
Closing Thoughts
With Raff’s pre-configured Docker template, you can skip the manual setup and go straight to running containers in minutes.
It’s a simple, powerful setup for developers who want to experiment, learn, or deploy without the overhead of traditional hosting.
