VOOZH about

URL: https://www.digitalocean.com/community/tutorials/webinar-series-building-containerized-applications?comment=83365

โ‡ฑ Webinar Series: Building Containerized Applications | DigitalOcean


Webinar Series: Building Containerized Applications

Published on December 23, 2017
๐Ÿ‘ Webinar Series: Building Containerized Applications

Introduction

In the last tutorial, How to Install and Configure Docker, we explored one method for converting Docker containers into Docker images. Although the method we used worked, it is not always the optimal way of building images.

In many cases, youโ€™ll want to bring existing code into container images, and youโ€™ll want a repeatable, consistent mechanism for creating Docker images that are in sync with the latest version of your codebase.

A Dockerfile addresses these requirements by providing a declarative and consistent way of building Docker images.

Additionally, youโ€™ll sometimes want to containerize entire applications which are composed of multiple, heterogeneous containers that are deployed and managed together.

Docker Compose, like a Dockerfile, takes a declarative approach to provide you with a method for defining an entire technology stack, including network and storage requirements. This not only makes it easier to build containerized applications, but it also makes it easier to manage and scale them.

In this tutorial, you will use a sample web application based on Node.js and MongoDB to build a Docker image from a Dockerfile, you will create a custom network that allows your Docker containers to communicate, and you will use Docker Compose to launch and scale a containerized application.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

Tutorial Series: Webinar Series: Deploying & Managing Containerized Workloads in the Cloud

This series covers the essentials of containers, including container lifecycle management, deploying multi-container applications, scaling workloads, and understanding Kubernetes, along with highlighting best practices for running stateful applications. These tutorials supplement the by the same name.

About the author(s)

Cloud Computing Enthusiast

Technical Editor @ DigitalOcean

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Nice tutorial! Thanks for sharing ^_^

I got an error with web container unable to connect to mongo db container port:27017, which resulted in web container exiting. so I have to add expose statement to the db service : db: 4 image: mongo:latest 5 expose : 6 - โ€˜27017โ€™ 7 container_name: db 8 networks: 9 - todonet

You may need to add this in your Dockerfile to test if the web container is connected to the db container with ping.

RUN apt-get update && apt-get install -y iputils-ping

Very useful tutorialโ€ฆ Thank you very much. Hope you update it by using the latest versions of docker and docker-compose.

  • I got errors when running exec on the web container to ping the db.
  • I edit the docker-compose.yaml file using version 3, also I add the depends_on instruction to the web container so it can be linked to the db, Iโ€™m wondering why it isnโ€™t present in the yaml file!.. I think it is mandatory.
๐Ÿ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOceanโ€™s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

ยฉ 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.