Giter VIP home page Giter VIP logo

docker-nuget-klondike's Introduction

NuGet Server with Klondike for Docker

Show your support for this project by signing up for a free Bitrise account!

Provides a clean and easy way to run your own public/private NuGet repository with Klondike as the frontend, all inside a Docker container.

This image is based on docker-klondike, adding easier configuration, volume mounting and optional authentication.


Basic Usage

Sample usage:

docker run -p 8080:80 -v /my/host/klondike/Settings.config:/app/Settings.config -v /my/host/klondike/data:/data --name nuget-klondike -d didstopia/nuget-klondike:latest

The first time this image runs, it will create a Settings.config file under the /data folder, which you can customize and restart to apply your changes.

You can additionally add authentication like this (remove -c if the file exists):

docker exec nuget-klondike htpasswd -b -c /data/klondike_users user password

To disable authentication, simply delete /data/klondike_users. Enabling and disabling authentication happens automatically, so you don't need to restart your container.

NOTE: If you enable authentication, everything is protected except for GET/HEAD requests to /api/packages/*, for obvious reasons.


Licenses

This project is provided under the MIT License.

docker-nuget-klondike's People

Contributors

dids avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rogierpennink

docker-nuget-klondike's Issues

BadImageFormatException: Method has no body

While starting up using the docker run command mentioned on the Docker Hub page, I got the following exception:

$ docker run -p 8080:8080 -v /mnt/klondike/Settings.config:/app/Settings.config -v /mnt/klondike/data:/data --name nuget-klondike -d didstopia/nuget-klondike:latest

$ docker logs nuget-klondike
Running interactively
2020-01-29 12:35:11,030 [1] INFO  Klondike.SelfHost.KlondikeService - Using ServerFactory Nowin
2020-01-29 12:35:11,362 [1] INFO  NuGet.Lucene.LucenePackageRepository - Refreshing index. Package count: 0

Unhandled Exception:
System.InvalidOperationException: object_op ---> System.BadImageFormatException: Method has no body
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0001c] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <48a9445e1a984c0ea64991d819326d49>:0
  at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x00184] in <48a9445e1a984c0ea64991d819326d49>:0
   --- End of inner exception stack trace ---
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x001a6] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.FileSystemWatcher.Start () [0x0001b] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <48a9445e1a984c0ea64991d819326d49>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at NuGet.Lucene.PackageFileSystemWatcher.Initialize () [0x0010b] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.LuceneRepositoryConfigurator.InitializeFileSystemWatcher (NuGet.IFileSystem fileSystem, NuGet.Lucene.ILucenePackageRepository repository) [0x00034] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.LuceneRepositoryConfigurator.Initialize () [0x00135] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.Web.NuGetWebApiModule.InitializeRepositoryConfigurator (NuGet.Lucene.Web.INuGetWebApiSettings settings) [0x00065] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at NuGet.Lucene.Web.NuGetWebApiModule.Load (Autofac.ContainerBuilder builder) [0x00023] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Autofac.Module.Configure (Autofac.Core.IComponentRegistry componentRegistry) [0x00014] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at Autofac.ContainerBuilder.Build (Autofac.Core.IComponentRegistry componentRegistry, System.Boolean excludeDefaultModules) [0x00047] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at Autofac.ContainerBuilder.Build (Autofac.Builder.ContainerBuildOptions options) [0x0000d] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at NuGet.Lucene.Web.Startup.CreateContainer (Owin.IAppBuilder app) [0x0002a] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Klondike.Startup.CreateContainer (Owin.IAppBuilder app) [0x0001e] in <471c953d97084dc3924e06440989824d>:0
  at Klondike.SelfHost.SelfHostStartup.CreateContainer (Owin.IAppBuilder app) [0x0001d] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at NuGet.Lucene.Web.Startup.Configuration (Owin.IAppBuilder app) [0x00018] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp (Microsoft.Owin.Hosting.Engine.StartContext context) [0x000dc] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.Engine.HostingEngine.Start (Microsoft.Owin.Hosting.Engine.StartContext context) [0x00059] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.WebApp.StartImplementation (System.IServiceProvider services, Microsoft.Owin.Hosting.StartOptions options, System.Action`1[T] startup) [0x0008a] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.WebApp.Start (Microsoft.Owin.Hosting.StartOptions options, System.Action`1[T] startup) [0x00006] in <f9c6a24237684643b127a582774aa6dc>:0
  at Klondike.SelfHost.KlondikeService.OnStart (System.String[] args) [0x000f4] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at Klondike.SelfHost.KlondikeService.RunInteractivley () [0x00007] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at (wrapper remoting-invoke-with-check) Klondike.SelfHost.KlondikeService.RunInteractivley()
  at Klondike.SelfHost.Program.Main (System.String[] args) [0x0002c] in <0689f2147707493d8b3b4a1a2cba90a7>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: object_op ---> System.BadImageFormatException: Method has no body
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0001c] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <48a9445e1a984c0ea64991d819326d49>:0
  at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x00184] in <48a9445e1a984c0ea64991d819326d49>:0
   --- End of inner exception stack trace ---
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x001a6] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.FileSystemWatcher.Start () [0x0001b] in <48a9445e1a984c0ea64991d819326d49>:0
  at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <48a9445e1a984c0ea64991d819326d49>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at NuGet.Lucene.PackageFileSystemWatcher.Initialize () [0x0010b] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.LuceneRepositoryConfigurator.InitializeFileSystemWatcher (NuGet.IFileSystem fileSystem, NuGet.Lucene.ILucenePackageRepository repository) [0x00034] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.LuceneRepositoryConfigurator.Initialize () [0x00135] in <0073e3358ea14ca89ead12e40c83592f>:0
  at NuGet.Lucene.Web.NuGetWebApiModule.InitializeRepositoryConfigurator (NuGet.Lucene.Web.INuGetWebApiSettings settings) [0x00065] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at NuGet.Lucene.Web.NuGetWebApiModule.Load (Autofac.ContainerBuilder builder) [0x00023] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Autofac.Module.Configure (Autofac.Core.IComponentRegistry componentRegistry) [0x00014] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at Autofac.ContainerBuilder.Build (Autofac.Core.IComponentRegistry componentRegistry, System.Boolean excludeDefaultModules) [0x00047] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at Autofac.ContainerBuilder.Build (Autofac.Builder.ContainerBuildOptions options) [0x0000d] in <ca1ca41f44e0487e9a15b2f64e38c7de>:0
  at NuGet.Lucene.Web.Startup.CreateContainer (Owin.IAppBuilder app) [0x0002a] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Klondike.Startup.CreateContainer (Owin.IAppBuilder app) [0x0001e] in <471c953d97084dc3924e06440989824d>:0
  at Klondike.SelfHost.SelfHostStartup.CreateContainer (Owin.IAppBuilder app) [0x0001d] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at NuGet.Lucene.Web.Startup.Configuration (Owin.IAppBuilder app) [0x00018] in <1a71524a5e544cf0aa818bed7601d43e>:0
  at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp (Microsoft.Owin.Hosting.Engine.StartContext context) [0x000dc] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.Engine.HostingEngine.Start (Microsoft.Owin.Hosting.Engine.StartContext context) [0x00059] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.WebApp.StartImplementation (System.IServiceProvider services, Microsoft.Owin.Hosting.StartOptions options, System.Action`1[T] startup) [0x0008a] in <f9c6a24237684643b127a582774aa6dc>:0
  at Microsoft.Owin.Hosting.WebApp.Start (Microsoft.Owin.Hosting.StartOptions options, System.Action`1[T] startup) [0x00006] in <f9c6a24237684643b127a582774aa6dc>:0
  at Klondike.SelfHost.KlondikeService.OnStart (System.String[] args) [0x000f4] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at Klondike.SelfHost.KlondikeService.RunInteractivley () [0x00007] in <0689f2147707493d8b3b4a1a2cba90a7>:0
  at (wrapper remoting-invoke-with-check) Klondike.SelfHost.KlondikeService.RunInteractivley()
  at Klondike.SelfHost.Program.Main (System.String[] args) [0x0002c] in <0689f2147707493d8b3b4a1a2cba90a7>:0

This is related to mono/mono#12557 and can be solved with the workaround at mono/mono#12557 (comment) - that is, changing all libmono-native.so to libmono-native.so.0 in /etc/mono/config.

Should this workaround maybe go into this image?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.