Code Monkey home page Code Monkey logo

docker-nuget-server's People

Contributors

idoop avatar koltesdigital avatar ntt-matthias-fleschuetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-nuget-server's Issues

Attempts to download the nupkg have failed

I was able to install this into my k8s environment and ultimately pushed some nupkg files to it. Calling the V2 api I'm able to list all the packages also. The problem occurs when I try to install these packages.
My Visual Studio 2017 reads them in Package Manager and it seem slike they're installable but I encounter this error:
The feed 'Scenario Manager Common [http://sm-dev.kubeodc.corp.intranet/nuget]' lists package 'ScenarioManager.Common.Utilities.1.0.0.48946' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.
NuGetErr

500 Internal Server Error

019/09/11 02:59:59 [error] 34#34: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/simple-nuget-server/inc/db.php:10
Stack trace:
#0 /var/www/simple-nuget-server/inc/db.php(10): PDO->__construct('sqlite:../db/pa...', NULL, NULL)
#1 /var/www/simple-nuget-server/inc/db.php(386): DB::init()
#2 /var/www/simple-nuget-server/inc/core.php(3): require('/var/www/simple...')
#3 /var/www/simple-nuget-server/public/index.php(2): require('/var/www/simple...')
#4 {main}
thrown in /var/www/simple-nuget-server/inc/db.php on line 10" while reading response header from upstream, client: 192.168.0.121, server: nuget.ivilson.com:80, request: "PUT /api/v2/package/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.ivilson.com"
192.168.0.121 - - [11/Sep/2019:02:59:59 +0000] "PUT /api/v2/package/ HTTP/1.1" 500 5 "-" "NuGet Command Line/5.2.0 (Microsoft Windows NT 6.2.9200.0)" "220.173.39.41"
2019/09/11 02:59:59 [error] 34#34: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/simple-nuget-server/inc/db.php:10
Stack trace:
#0 /var/www/simple-nuget-server/inc/db.php(10): PDO->__construct('sqlite:../db/pa...', NULL, NULL)
#1 /var/www/simple-nuget-server/inc/db.php(386): DB::init()
#2 /var/www/simple-nuget-server/inc/core.php(3): require('/var/www/simple...')
#3 /var/www/simple-nuget-server/public/index.php(2): require('/var/www/simple...')
#4 {main}
thrown in /var/www/simple-nuget-server/inc/db.php on line 10" while reading response header from upstream, client: 192.168.0.121, server: nuget.ivilson.com:80, request: "PUT /api/v2/package/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.ivilson.com"
192.168.0.121 - - [11/Sep/2019:02:59:59 +0000] "PUT /api/v2/package/ HTTP/1.1" 500 5 "-" "NuGet Command Line/5.2.0 (Microsoft Windows NT 6.2.9200.0)" "220.173.39.41"
2019/09/11 03:00:00 [error] 34#34: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/simple-nuget-server/inc/db.php:10
Stack trace:
#0 /var/www/simple-nuget-server/inc/db.php(10): PDO->__construct('sqlite:../db/pa...', NULL, NULL)
#1 /var/www/simple-nuget-server/inc/db.php(386): DB::init()
#2 /var/www/simple-nuget-server/inc/core.php(3): require('/var/www/simple...')
#3 /var/www/simple-nuget-server/public/index.php(2): require('/var/www/simple...')
#4 {main}
thrown in /var/www/simple-nuget-server/inc/db.php on line 10" while reading response header from upstream, client: 192.168.0.121, server: nuget.ivilson.com:80, request: "PUT /api/v2/package/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.ivilson.com"
192.168.0.121 - - [11/Sep/2019:03:00:00 +0000] "PUT /api/v2/package/ HTTP/1.1" 500 5 "-" "NuGet Command Line/5.2.0 (Microsoft Windows NT 6.2.9200.0)" "220.173.39.41"

bug in entrypoint - BASE_URL duplicates

If you set the BASE_URL env value the following script will be executed in https://github.com/idoop/docker-nuget-server/blob/master/docker-entrypoint

  if [ -n "${BASE_URL}" ];then
    echo "Use base URL: ${BASE_URL}"
    sed -i -e "/fastcgi_temp_file_write_size.*$/a\        fastcgi_param BASE_URL ${BASE_URL};" /etc/nginx/conf.d/nuget.conf
  fi

This creates new entries on every reboot of the containers and eventually your nginx.conf file will look like this

    location ~ \.php$ {

        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        fastcgi_buffers 4 1024k;
        fastcgi_buffer_size 1024k;
        fastcgi_busy_buffers_size 1024k;
        fastcgi_temp_file_write_size 5M;
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param BASE_URL https://domain.tld/;
        ...
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

    }

    location = /index.php {
        dav_methods PUT DELETE;

        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        fastcgi_buffers 4 1024k;
        fastcgi_buffer_size 1024k;
        fastcgi_busy_buffers_size 1024k;
        fastcgi_temp_file_write_size 5M;
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param BASE_URL https://domain.tld/;
        ....
        fastcgi_param BASE_URL https://domain.tld/;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

        # PHP doesn't parse request body for PUT requests, so fake a POST.
        fastcgi_param REQUEST_METHOD POST;
        fastcgi_param HTTP_X_METHOD_OVERRIDE $request_method;
    }

Permission in External Volumes

Hi,

When mounting volumes like [My/path]:[/var/www/something] the application crashes. After investigating for a good while, it is because it fails to create the database. What I notice is that when I run it without mounting external volumes, the "/var/www/something" folder has owner and group www-data but when mounting, it is root.

If I run docker exec bash and modify permissions, then the app is able to create the database.

docker-compose not working adding ports with each start

Starting container new with docker-compose will result in port added with each start.

artifacts-nuget | 2021/03/05 11:00:11 [emerg] 32#32: invalid port in "808080" of the "listen" directive in /etc/nginx/conf.d/nuget.conf:6
artifacts-nuget | nginx: [emerg] invalid port in "808080" of the "listen" directive in /etc/nginx/conf.d/nuget.conf:6
artifacts-nuget | 2021/03/05 11:00:26 [emerg] 30#30: invalid port in "8080808080" of the "listen" directive in /etc/nginx/conf.d/nuget.conf:6
artifacts-nuget | nginx: [emerg] invalid port in "8080808080" of the "listen" directive in /etc/nginx/conf.d/nuget.conf:6

Next and so on...

bug in entrypoint - SERVER_PORT

If you set the SERVER_PORT env value the following script will be executed in https://github.com/idoop/docker-nuget-server/blob/master/docker-entrypoint

    sed -i -e "s/listen 80/listen ${SERVER_PORT}/" /etc/nginx/conf.d/nuget.conf

I set SERVER_PORT to 8080 and restarted the container. The nuget server listened on port 8080 as expected.

I set SERVER_PORT back to 80 and restarted the container. The nuget server still listened on port 8080 and was not reachable anymore.

Unable to download package "Invalid Port"

I'm hosting the idoop/docker-nuget-server image on Azure and am trying to install an uploaded image. This doesn;t work ad i get an "invalid port" error.

relevant configuration in app service config:

image

publishing an image and finding it works without an issue. But installing the module is trying to retrieve the package from port 80 instead of 443.

image

manually going to the same url with 443 works.

setting the environment variable to 443 breaks the container and it wont start anymore.

SERVER_PORT environment variables does not work

I am trying to run the NuGet server on a machine which already has port 80 in use. A typical docker approach is to allow me to provide -p 81:80 however the NuGet server provides URLs of packages which are then located on port 80 which fails.

I tried adding '-e SERVER_PORT=81 -p 81:81 --network=host' to my Docker run command however this seemed to make no difference.

I guess another approach could be to put NuGet behind a reverse proxy at /nuget on port 80 however there is no way to configure NuGet to work on this path.

Sever name - 403 forbidden

Has the compose file/image been tested against SERVER_NAME variables other than 'localhost' and '127.0.0.1'? The 'nuget install' command via any other server name results in a 403 forbidden error regardless of if it is an IP or a domain name and regardless of if the command is run on the same host as the container or a different host.

nuget install -source http://x.x.x.x -packagesavemode nupkg
WARNING: The remote server returned an error: (403) Forbidden.
WARNING: An error occurred while loading packages from 'http:/x.x.x.x/': The remote server returned an error: (403) Forbidden.

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.