Skip to main content

A rocker wrapper for launching and attaching vscode to a rocker container

Project description

rockervsc

Continuous Integration Status

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

Intro

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. I do most of my development in vscode with the devcontainers extension so this wrapper simplifies that workflow. Rather than calling rocker and then attaching vscode, this wrapper combines those actions into one command.

Installation

pip install rockervsc

Usage

To run rocker and automatically launch and attach a vscode instance, run this command:

rockervsc 

You can pass all the normal rocker arguments to rockervsc and it will forward them to rocker, e.g.:

rockervsc --x11 --nvidia

by default rockervsc calls rockerc so instead of passing arguments explicitly you can have a rockerc.yaml file in your workspace

image: ubuntu:22.04
args:
  - nvidia
  - x11 
  - user 
  - git 

and running:

rockervsc

will launch and attach vscode to the container with nvidia, x11, the current user id and git set up for you.

Caveats

I'm not sure this is the best way of implementing rockervsc like functionality. It might be better to implement 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.

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

rockervsc-0.3.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

rockervsc-0.3.2-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file rockervsc-0.3.2.tar.gz.

File metadata

  • Download URL: rockervsc-0.3.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for rockervsc-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4a7659cfb1ad5e2e493c70f87289d26b68f559b68bdb945f6eea4fcf2edff74e
MD5 29e94780b3c77f7ebbf7470d5992e60e
BLAKE2b-256 d27df451f352f92be9692bc480bc6a8c71f5254924baf9cb3c8c25733a6c69a3

See more details on using hashes here.

File details

Details for the file rockervsc-0.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: rockervsc-0.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for rockervsc-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 66514626028bf9bda1da3e03e97f5410a88d3ce90aeb338f777f9c1539d4f22e
MD5 1170b2507db7294d50bdb6f49844b018
BLAKE2b-256 80880531c5c4522b8dd6513dfe6be9b702190abff4d8b00957b09a91d8881704

See more details on using hashes here.

Supported by

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