📌
MBPY: Schools Technology
  • About this Resource
  • Installation
    • Requirements
    • Getting Started Local Install
    • Getting Started using Docker
    • Further instructions with Docker
    • Updating with Docker
  • Tutorials
    • Configuration
    • Importing
    • Extracting
    • Streaming
    • Pipelines
    • Scripting
    • Big Query
  • Querying & Tranformations
    • Querying Commands
    • Querying the Database
    • Querying via Script
    • Querying via an SQLite Client
  • Scripts
    • Daily Homeroom Attendance Report
  • Pipelines
    • Dataframes with pandas
    • Pipelines
    • Example Pipelines
      • Bulk Change Email domain
      • Enrollment by Gender
  • Plugins
    • mbpy_powerschool_plugin
      • PowerSchool Plugin
        • API reference
      • mbpy Plugin
        • mbpy plugin source code
    • Plugins Overview
    • mbpy_plugin_example
    • mbpy_plugin_destiny
    • mbpy_plugin_attendance_reports
Powered by GitBook
On this page
  • Enable persistence across executions
  • Use an alias on the host

Was this helpful?

Export as PDF
  1. Installation

Further instructions with Docker

Please see the below information which essentially bootstraps the Getting Started setup for further functionality.

The instructions in Getting Started and Updating with Docker are intended to provide an environment with the shortest path to being able to get started with the application. Installing with that method has a drawback, in that once the container is exited, any data written to disk is lost.

In order to set up an environment where such operations are available, please see the below.

Enable persistence across executions

Using the docker concept of volumes, any data imported into mbpy or written to disk during an operation will persist across executions.

In the instructions, following the "From the host", instead of this:

docker run -it --rm mbpy_mbpycli

Use the volume option:

docker run -it -v .:/docker --rm mbpy_mbpycli

This adds a -v ("volume") option, telling docker to take the host's current directory (".") and bind it (":) to the container directory (/docker). Please note, however, that the use of "current directory" assumes that you are in the same directory that you cloned into.

A more general-purpose command, then, which you can execute no matter the current working directory, would be to replace the "." with the full path to the mbpy folder. If you followed the instructions for getting started, it's just this:

docker run -it -v ~/src/mbpy:/docker --rm mbpy_mbpycli

Great! So now we can add whatever commands onto the end. However, that is a lot of typing, is there a way to just type mbpy from our host terminal? Yes, yes there is, which is the topic of the next section:

Use an alias on the host

The docker container itself already has an mbpy alias set up so that typing it when connected to the shell in the container executes the application.

PreviousGetting Started using DockerNextUpdating with Docker

Last updated 2 years ago

Was this helpful?