Git Product home page Git Product logo

docker-ubuntu16-blobfuse's Introduction

docker-ubuntu16-blobfuse

Docker image based on ubuntu:16.04 which mounts an Azure blob container via Microsoft's FUSE driver.

mount-blobfuse.sh entrypoint

The provided mount-blobfuse.sh entrypoint simply mounts the given blob container at the specified mount point and then executes whatever command was provided via exec "$@".

make shell is a shortcut for specifying /bin/bash to the docker run command.

Environment variables

The entrypoint expects the following environment variables:

  • AZURE_STORAGE_ACCOUNT
  • AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN
  • AZURE_STORAGE_ACCOUNT_CONTAINER
  • AZURE_MOUNT_POINT

Note: You must provide either AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN. If you specify both, blobfuse will fail and remind you "exactly one of the environment variables AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN must be set."

As documented in the Makefile, there are (at least) three different ways to handle these environment variables:

  • If the calling shell already has the proper environment variables set, simply naming them via the -e flag to docker run will safely pass in their values automatically:
ENV = \
  -e AZURE_STORAGE_ACCOUNT \
  -e AZURE_STORAGE_SAS_TOKEN \
  -e AZURE_STORAGE_ACCOUNT_CONTAINER \
  -e AZURE_MOUNT_POINT
  • During development, it may be convenient to read these environment variables into make from a file (e.g., via the include .env directive). You would then need to pass the names and values to docker run which would expose their values to the command line (and ps):
ENV = \
  -e AZURE_STORAGE_ACCOUNT="${AZURE_STORAGE_ACCOUNT}" \
  -e AZURE_STORAGE_SAS_TOKEN="${AZURE_STORAGE_SAS_TOKEN}" \
  -e AZURE_STORAGE_ACCOUNT_CONTAINER="${AZURE_STORAGE_ACCOUNT_CONTAINER}" \
  -e AZURE_MOUNT_POINT="${AZURE_MOUNT_POINT}"
  • A safer way to read these credentials from a file is to use the --env-file flag to docker run:
ENV = --env_file /path/to/azure_secrets.env

See this informative article by Vladislav Supalov for more information about passing environment variables to Docker containers, including with Docker Compose.

docker-ubuntu16-blobfuse's People

Contributors

jeffreybreen avatar

Watchers

 avatar

Forkers

devops8012

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.