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.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

rockervsc-0.4.0-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: rockervsc-0.4.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for rockervsc-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1dcc73052f5903f06fbb375ac2c8e51d0b50e42457c59902f56b7837ee5c1afa
MD5 5aa81f54e25491112e73af99f1ffde6a
BLAKE2b-256 811aaeb5e474272c953875e78f65ac4fa0e53373440983103caf194a20ad6093

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockervsc-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for rockervsc-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 13a6b4431aa388781e14facc6e47f26c8f5507ca804da88965201b767044688c
MD5 f00d199d7ea58dd82188eef25a40438b
BLAKE2b-256 5e718fde4c2a04e1c52baefd8eca1ee0c22e8a74e1713a77b04af14ce2d0d3df

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