A cli application to help build custom versions of the sci-oer course container
Project description
Automated SCI-OER Image Builder
This is an automated build tool to generate customized versions of the language specific versions of the base-resources images.
Typically, a customized docker image can be created by extending a Dockerfile
with the new modifications and setup script and your good to go.
However, some of the tools that are prepackaged in this container can not be customized and configured without the services running (wiki-js).
This service aims to solve this problem by running a version of the base image, customizing it, extracting the configuration files, then repackaging them into a new Docker image.
Requirements
In order to run this project you must have the following installed and running on your machine:
- docker
- git
- python3
The build script will start a docker container in the background, so it can be customized then build a new docker image. The user that is running the build script must have permissions to run docker commands.
Git must be installed in-order to load and configure the seeded content.
Building this Docker Image
This image has been published to Docker Hub, but the follow command can be used to build the image locally.
docker build \
--build-arg GIT_COMMIT=$(git rev-parse -q --verify HEAD) \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t scioer/automated-builder:latest .
Creating a Custom Image
This script will create a sci-oer image that is customized with the following:
- a set of pre-made lecture content
- one or more example project repositories.
- wiki content to be loaded from a git repository
- a set of Jupyter lab notebooks
- a customized wiki title
There are a number of configuration options that can be specified when building the customized container.
Run scioer-builder --help
to see a complete list of configuration options and how they can be used.
All the options are optional, if one is left out then no content will be configured.
There are currently three methods that can be used to create a customized image.
- Using the published
scioer-builder
package (preferred) - Using a prebuilt docker image
- Calling the
scioer_builder/cli.py
script directly
Using Docker
For convenience a prebuilt Docker image has been published that includes all the dependencies needed to generate a custom image.
For the automated-builder
container to be able to create the custom docker image it must have the docker socket passed into the container.
$ docker run -v /var/run/docker.sock:/var/run/docker.sock \
scioer/automated-builder:latest <options here>
NOTE: If you are using the --key-file
option when running with docker, the path that is specified must be the path in the container, not on the host machine
Using the pip package
The auto builder script has been distributed to pypi for easy use. It can be installed by running:
pip install scioer-builder
Then run as a normal command:
scioer-builder --help
Getting Help
If you need help getting the builder script to work or have questions or find any issues you can open a GitHub Issue.
Getting Involved
If you notice something that doesn't quite work or if you want to add new features or support the implementation any contributions are welcome.
Currently, we are focusing on completing this script so that all of the aspects of the sci-oer container can be customized using the cli, or possibly a configuration file. The next steps will be to develop a web interface so that the customized version can be created without needing to install all the tools.
See the CONTRIBUTING.md guide for more information.
License
This project has been published under the AGPL-3.0 License. This essentially means that you can use this for whatever you want as long as any modifications you make are published under the same license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scioer-builder-0.16.0.tar.gz
.
File metadata
- Download URL: scioer-builder-0.16.0.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83a88a052e52d2c255f30e701ede46ffa7b2a6b12a87433df8688c4a1b065b10 |
|
MD5 | 345354e2621701202ab8aedaece34294 |
|
BLAKE2b-256 | c46e8ce3f60b380d5de348aa0d700868bc828e70ce59e26512b468cb0dfc59b9 |
File details
Details for the file scioer_builder-0.16.0-py3-none-any.whl
.
File metadata
- Download URL: scioer_builder-0.16.0-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3904c082994bada3af7c36cd326aedbc21f1ada0037dc05ee29cdd57107afa6 |
|
MD5 | 1817d6b1764cf800e0bbd433bed6b2ca |
|
BLAKE2b-256 | 1a14f35c3bb2c1773d9633c13be0863629bcb35c0e2d04551f02f087ddaadef8 |