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

Recommended Method:

Install uv and then install it as a globally available tool on your system

uv tool install rockervsc
uv tool install rockerc #it can be useful to use rockerc without attaching to vscode as well

Deprecated Method:

Globally install via pip, but this is not really recommended

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.5.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.5.0-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: rockervsc-0.5.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.11

File hashes

Hashes for rockervsc-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ee72def38def06338f275f033db5b86c4ca95598377c22b8d90238a55e8beba5
MD5 47253bd4e35b51ef33f3ca5c5b84dfdd
BLAKE2b-256 99144a105af269aded5c89cd71f9b0c86fae9eb88e8dc9d0cab2d233d931cf16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rockervsc-0.5.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.11

File hashes

Hashes for rockervsc-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d98218e0094afff892f7bd5e9afa121b33b4a3071b6879fff9f3df87cfed0f9f
MD5 de7f9f84ab1cf757a93b32e9315340de
BLAKE2b-256 9216aaab5a7744825ac25190341ac8416022497f5f92e7c61140b6b196beab15

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