Skip to main content

A tool to parse rockerc.yaml files and pass on the arguments onto rocker

Project description

rockerc

Continuous Integration Status

Ci Codecov GitHub issues GitHub pull-requests merged GitHub release PyPI - Downloads License Python Pixi Badge

Installation

Recommended Method:

Install pipx (if not already installed):

sudo apt install pipx
pipx ensurepath

Then install rockerc and its dependencies globally with:

pipx install --include-deps rockerc

to develop run

pipx install --include-deps . --force

This will ensure that rockerc and rocker commands are available on your PATH.

Usage

navigate to a directory with a rockerc.yaml file and run:

rockerc 

This will search for a rockerc.yaml in the current directory and pass those arguments to rocker.

If no rockerc.yaml is found in the current directory, rockerc will look for a user-level config at ~/.rockerc.yaml and use it if present.

If neither is found, rockerc will not enable any extensions by default. You can still pass rocker arguments on the command line, for example:

rockerc ubuntu:22.04

which runs rocker ubuntu:22.04 without any extensions.

Motivation

Rocker is an alternative to docker-compose that makes it easier to run containers with access to features of the local environment and add extra capabilities to existing docker images. However rocker has many configurable options and it can get hard to read or reuse those arguments. This is a naive wrapper that read a rockerc.yaml file and passes them to rocker. There are currently no plans to integrate docker-compose like functionalty directly into rocker so I made this as a proof of concept to see what the ergonomics of it would be like.

Caveats

I'm not sure this is the best way of implementing rockerc like functionality. It might be better to implmented it as a rocker extension, or in rocker itself. This was just the simplest way to get started. I may explore those other options in more detail in the future.

rocker.yaml configuration

You need to pass either a docker image, or a relative path to a dockerfile

rockerc.yaml

image: ubuntu:22.04

or

dockerfile: Dockerfile

will look for the dockerfile relative to the rockerc.yaml file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rockerc-0.9.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rockerc-0.9.0-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rockerc-0.9.0.tar.gz.

File metadata

  • Download URL: rockerc-0.9.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for rockerc-0.9.0.tar.gz
Algorithm Hash digest
SHA256 1b5847b843155fd215b8c900188fabe6d5f7baf7f4558bad1eef6c677b85be8b
MD5 543ccdc111192aa4e5189aacab6ce205
BLAKE2b-256 036a33ae45d0c8fda81380371daece8f305545585973f45adf7e043a4f9c391d

See more details on using hashes here.

File details

Details for the file rockerc-0.9.0-py2.py3-none-any.whl.

File metadata

  • Download URL: rockerc-0.9.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for rockerc-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c863397f1c8a234f4eca714f845e18fd695feacd9d5d6ad469eee27dd01bda52
MD5 ee96650058eae4ca5594551cb884b8b0
BLAKE2b-256 b492d013321ac831ddc22c1a53ad2d3c8699d67b9b928008026f2148d4107ca6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page