Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Azure icon
Labs

Storing Container Data in Azure Blob Storage

Using Docker volumes is the preferred method of locally storing container data. Volume support is built directly into Docker, making it an easy tool to use for storage, as well as more portable. However, storing container data in Docker volumes still requires us to back up the data in those volumes on our own. There is another option: storing our container data in the Cloud. It's not a solution for every problem, but this lab demonstrates another tool at our disposal. This lab shows how to mount a Blob Storage container onto our local system as a directory. We will then mount that directory into our Docker container. We will use an httpd container to serve the contents of that bucket as a webpage, but we can use it to share any common data between containers. This will demonstrate how flexible Docker can be. We can make changes to our bucket, and all our containers using the Blob Storage container will near-instantly have access to the content.

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 45m
Published
Clock icon Apr 10, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Configuration and Installation

    1. Obtain Azure authentication credentials by using the Azure command line utility.

      Note: Use the website, and authentication code in the terminal to get a login page, then use the portal login credentials provided in the lab.

    2. Set the environment variables AZURE_STORAGE_ACCOUNT, and AZURE_STORAGE_ACCESS_KEY.
    3. Install Microsoft's repository, available from https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm.
    4. Install blobfuse.
    5. Configure FUSE to allow all users to mount the storage.
  2. Challenge

    Prepare the Storage

    1. Create a mount point on the server at /mnt/widget-factory and change its ownership to your user.
    2. Mount the Azure Blob Storage Container to the new mount point using blobfuse.
    3. Copy the website files to the Blob Storage Container.
    4. Verify that the files are present on the cloud.
  3. Challenge

    Use the Storage in a Container

    1. Run an httpd container to serve the website. Remember to mount the Blob Storage to the container and publish the web server port.
    2. View the webpage in a browser. Use the server's public IP provided with the lab.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans