LOLINTERNETZ / vscodeoffline

Enables Visual Studio Code's extension gallery to be used in offline (air-gapped) environments. Or, run your own gallery!
https://hub.docker.com/u/lolinternet
MIT License
95 stars 28 forks source link

[Request] Running vscodeoffline on Windows where `docker-compose` is not available but `pipenv` is available #22

Open hmasdev opened 2 years ago

hmasdev commented 2 years ago

I want to use vscodeoffline on Windows 10 where I cannot use docker-compose but pipenv. I think this is an important issue, because I guess that not a few organizations prohibit using docker on Windows.

How do you think about it?

The followings are what I expect and a rough roadmap to the goal.

Excpected behavior

Roadmap

  1. find an alternative library for Windows to gunicorn, which is a WSGI HTTP Server for UNIX;

  2. update .gitignore in order to ignore Pipfile.lock;

  3. add Pipfile and .env as follows:

    [[source]]
    url = "https://pypi.org/simple"
    verify_ssl = true
    name = "pypi"
    
    [packages]
    logzero = "*"
    requests = "*"
    pytimeparse = "*"
    falcon = "*"
    {HERE IS A LIBRARY FOUND IN 1st STEP} = "*"
    watchdog = "*"
    
    [dev-packages]
    
    [requires]
    python_version = "3.7"
    
    [scripts]
    vscsync = "sh -c '{HERE IS A COMMAND LIKE IN ./vscodeoffline/vscsync/Dockerfile}'"
    vscgallery = "sh -c '{HERE IS A COMMAND LIKE IN ./vscodeoffline/vscgallery/Dockerfile}'"

    and

    ARTIFACTS="${PWD}/artifacts/"
    SYNCARGS="--sync"
    BIND="0.0.0:4430"
    TIMEOUT=180
    THREADS=4
  4. modify some hard-coded paths in ./vscoffline/server.py and ./vscoffline/vsc.py. For example, https://github.com/LOLINTERNETZ/vscodeoffline/blob/39d80f328b5ca12abb31b8b3374a662475ff0327/vscoffline/vsc.py#L16-L20 https://github.com/LOLINTERNETZ/vscodeoffline/blob/39d80f328b5ca12abb31b8b3374a662475ff0327/vscoffline/server.py#L411 https://github.com/LOLINTERNETZ/vscodeoffline/blob/39d80f328b5ca12abb31b8b3374a662475ff0327/vscoffline/server.py#L422 https://github.com/LOLINTERNETZ/vscodeoffline/blob/39d80f328b5ca12abb31b8b3374a662475ff0327/vscoffline/server.py#L350 https://github.com/LOLINTERNETZ/vscodeoffline/blob/39d80f328b5ca12abb31b8b3374a662475ff0327/vscoffline/server.py#L367

  5. test the above changes.

tomer953 commented 1 year ago

the docker is just a wrapper for running the python code, I don’t see a reason why you cant run the python files without docker. (after installing the required dependencies )

LOLINTERNETZ commented 1 year ago

This is basically written as a PR without the PR :-)

Happy to add pipenv with a PR as I tend to utilise Docker for separation of concerns.