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

First, install pipx if you don't have it already:

sudo apt update && sudo apt install -y pipx
pipx ensurepath

Then install rockervsc with pipx:

pipx install --include-deps rockervsc

This will install rockervsc ,rockerc and rocker as a globally available tool on your system.


## 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](https://github.com/blooop/rockerc) so instead of passing arguments explicitly you can have a rockerc.yaml file in your workspace

```yaml
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.6.0.tar.gz (7.0 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.6.0-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: rockervsc-0.6.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for rockervsc-0.6.0.tar.gz
Algorithm Hash digest
SHA256 3733b4f0c1f48a56895401e03c0afe3c56ca140e90842336cb40e9357590f015
MD5 579f1489c8a012b12f2ed4a99e5452dd
BLAKE2b-256 8ce0e3a849ef9b50b1e6133b20354280ae15492e1cdc1908ef1cb6ff2e2b9c91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockervsc-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for rockervsc-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5ddb0c4925111ebaa13978cf77fc560d2c3e5877c8093844a039eb3bdb91ce10
MD5 1372da61a4b90e6a6c23bb01acd3aef4
BLAKE2b-256 bab132a4e49c5f90d890b7033542daa3c40d58c120169830fd2a30ae25094a35

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