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

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.

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. I do most of my development in vscode with the devcontainers extension so this wrapper simplifies that workflow. I can easily spawn a vscode instance for any project with a rockerc.yaml file and have a near native development experience with all the nice-to-haves that rocker provides but still get the benefit of isolation.

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

Uploaded Source

Built Distribution

rockervsc-0.2.1-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for rockervsc-0.2.1.tar.gz
Algorithm Hash digest
SHA256 09d3e8c24c80cd709799dbae4657239a9dda263b6036cdfe91d72aa86cf73455
MD5 3c09ad176f04e704d97496925a2f2c0a
BLAKE2b-256 6699b7359f845fa3c4d529a333f59918ab0302a7aa5af43131241994023f18c9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rockervsc-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b69f5c88b739fe70adc47050514f96f2af5d8bb03bf9d596e9364d3fd7a2df4d
MD5 366ab9b8aedc3189d3c16ac2d5b4640f
BLAKE2b-256 edeca591b39b2557cc293b5c51ec810bcd1623c5f6493d2ed6a7993bf3aabab5

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