DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Creating a Private Repository for Visual Studio Extensions with Docker

Creating a Private Repository for Visual Studio Extensions with Docker

Sometimes, you just don't need everyone to see. Take a look at this brief tutorial that can help you create your own private Visual Studio ''Marketplace.''

Thiago Loureiro user avatar by
Thiago Loureiro
·
Oct. 15, 18 · Tutorial
Like (2)
Save
Tweet
Share
5.50K Views

Join the DZone community and get the full member experience.

Join For Free


Extensions and project templates nowadays are very common; we use extensions every day in Visual Studio. 

Extensions and templates are hosted in VisualStudio’s MarketPlace and are public, in some cases, especially when we talk about project templates, where we can have intellectual property of the company or project. We need a private “MarketPlace,” and I will demonstrate how to create one with Docker:

First of all, you need to have Docker installed and running.

Let’s use NGINXcontainer to host our package:

docker run --name docker-nginx -p 8080:80 -d nginx


With this command, we will map port 8080 to the host to access NGINX.

Image title


Great! We already have the web server up and running. We now create the XML file that we call gallery.xml where the settings are as shown below:

<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Component Title</title>
    <id>591c105e-bd42-4008-bcef-d822c1bd7607</id>
    <updated>2018-03-20T00:00:00Z</updated>
    <entry>
        <id>22496D52-F1E2-48DD-970F-93FA3D84F793</id>
        <title type="text">Component Name</title>
        <summary type="text">Description...</summary>
        <published>2018-03-21T00:00:00Z</published>
        <updated>2018-03-21T00:00:00Z</updated>
        <author>
            <name>Thiago :)</name>
        </author>
        <link rel="alternate" type="text/html" href="http://www.site.com"/>
        <link rel="releasenotes" type="text/html" href="http://www.site.com"/>
        <link rel="icon" type="text" href="image.png"/>
        <link rel="previewimage" type="text" href="image.png"/>
        <category term="Tools" />
        <content type="application/octet-stream" src="Extension.vsix" />
        <Vsix xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

              xmlns="http://schemas.microsoft.com/developer/vsx-syndication-schema/2010">
            <Id>22496D52-F1E2-48DD-970F-93FA3D84F793</Id>
            <Version>1.0</Version>
        </Vsix>
    </entry>
</feed> 

A very important detail is the <id> field and Guid must match exactly with the Guid of your Vsix package. If you do not know the Guid of your component, take a look at this hint:

To get the vsixid of a .vsix file, make a copy of the .vsix file and rename it to .zip. You can then open it and find an extension.vsixmanifest file inside. This is an XML file, and if you open it you will see an <Identity Id="guid"... /> node.

Then copy your files into the container, navigate to the folder and type the following commands:

docker cp ext.vsix docker-nginx:/usr/share/nginx/html/ext.vsix
docker cp gallery.xml docker-nginx:/usr/share/nginx/html/gallery.xml

Check to see if you can access the XML file:


If you receive the result as shown above your repository is ready. Now just open your Visual Studio and configure it in Tools -> Options and then Environment -> Extensions and Updates:


After that go to Tools -> Extensions and Updates and your RepoPrivado will be available with your package ready for Download and Updates.







Now just publish your container to your server and your extension repository is ready.

Docker (software) Repository (version control)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Writing a Modern HTTP(S) Tunnel in Rust
  • Deploying Java Serverless Functions as AWS Lambda
  • Automated Performance Testing With ArgoCD and Iter8
  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: