Skip to content

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

Description

@hmasdev

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

  • Running pipenv run vscsync runs vscsync as an alternative to docker-compose up vscsync and
  • Running pipenv run vscgallery runs vscgallery as an alternative to docker-compose up vscgallery.

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,

    ARTIFACTS = '/artifacts/'
    ARTIFACTS_INSTALLERS = '/artifacts/installers'
    ARTIFACTS_EXTENSIONS = '/artifacts/extensions'
    ARTIFACT_RECOMMENDATION = '/artifacts/recommendations.json'
    ARTIFACT_MALICIOUS = '/artifacts/malicious.json'
    observer.schedule(ArtifactChangedHandler(vscgallery), '/artifacts/', recursive=False)
    application.add_static_route('/artifacts/', '/artifacts/')
    with open('/opt/vscoffline/vscgallery/content/index.html', 'r') as f:
    with open('/opt/vscoffline/vscgallery/content/browse.html', 'r') as f:

  5. test the above changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions