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.3.tar.gz (6.3 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.3.3-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for rockervsc-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f05210a36928bae56d06bd23bf93000f0ab06a95eeacbdaa104754fc20a11033
MD5 146a120b37dd18099b68edff3a7befac
BLAKE2b-256 c5214c2783e91864e65b394db6da8a5f5487e6e03c65d530fcaeb1eb5af9e613

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockervsc-0.3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4f5b0bbc27ed4fcc9f288dba562cb7117e9256c72e3d045ad81b6c9ef4341e91
MD5 b5100c3f4bd834900137b961f3783719
BLAKE2b-256 819658c24ca615d24dfd75b9a0a4ceae1c66655e0b8656f1a4f62c3b1efd770f

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