rolfwessels / docker-simple-nuget-server Goto Github PK
View Code? Open in Web Editor NEWDocker file and auto building of simple-nuget-server
License: MIT License
Docker file and auto building of simple-nuget-server
License: MIT License
docker-simple-nuget-server/init.sh
Line 7 in a6292c7
I got the error message
nuget-server| update service config
nuget-server| chown: invalid user: 'data-www'
nuget-server| chown: invalid user: 'data-www'
nuget-server | Starting services
nuget-server | Restarting PHP 7.0 FastCGI Process Manager: php-fpm7.0.
nuget-server | Restarting nginx: nginx.
followed by
nuget-server | 192.168.143.136 - - [19/Mar/2018:14:40:56 +0000] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36" "-"
nuget-server | 2018/03/19 14:40:56 [error] 48#48: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /app/inc/db.php:10
nuget-server | Stack trace:
nuget-server | #0 /app/inc/db.php(10): PDO->__construct('sqlite:../db/pa...', NULL, NULL)
nuget-server | #1 /app/inc/db.php(370): DB::init()
nuget-server | #2 /app/inc/core.php(3): require('/app/inc/db.php')
nuget-server | #3 /app/public/index.php(2): require('/app/inc/core.p...')
nuget-server | #4 {main}
nuget-server | thrown in /app/inc/db.php on line 10" while reading response header from upstream, client: ... server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "...:8091"
I think
chown data-www /app/db
chown data-www /app/packagefiles
should be changed to www-data
While running a dotnet restore
or dotnet build
some request to the private nuget server returns a 502 Bad Gateway. Here are the logs:
...
10.244.2.73 - - [13/Oct/2019:18:14:29 +0000] "GET /FindPackagesById()?id='System.Collections.Immutable'&semVerLevel=2.0.0 HTTP/1.1" 502 173 "-" "NuGet .NET Core MSBuild Task/5.3.0 (Linux 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019)" "10.244.2.1"
2019/10/13 18:14:29 [error] 49#49: *1885 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='System.Security.Principal.Windows'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
2019/10/13 18:14:29 [error] 49#49: *2125 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='System.Security.Permissions'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
2019/10/13 18:14:29 [error] 49#49: *2136 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='runtime.native.System.IO.Compression'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
2019/10/13 18:14:29 [error] 49#49: *2137 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='xunit.extensibility.core'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
2019/10/13 18:14:29 [error] 49#49: *2139 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
2019/10/13 18:14:29 [error] 49#49: *2141 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 10.244.2.73, server: nuget.kube-dev.local, request: "GET /FindPackagesById()?id='System.Collections.Immutable'&semVerLevel=2.0.0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "nuget.kube-dev.local"
10.244.2.73 - - [13/Oct/2019:18:14:29 +0000] "GET /FindPackagesById()?id='Microsoft.Extensions.ApiDescription.Server'&semVerLevel=2.0.0 HTTP/1.1" 200 490 "-" "NuGet .NET Core MSBuild Task/5.3.0 (Linux 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019)" "10.244.2.1"
10.244.2.73 - - [13/Oct/2019:18:14:29 +0000] "GET /FindPackagesById()?id='Microsoft.Extensions.Diagnostics.HealthChecks'&semVerLevel=2.0.0 HTTP/1.1" 200 490 "-" "NuGet .NET Core MSBuild Task/5.3.0 (Linux 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019)" "10.244.2.1"
10.244.2.73 - - [13/Oct/2019:18:14:29 +0000] "GET /FindPackagesById()?id='System.Security.Permissions'&semVerLevel=2.0.0 HTTP/1.1" 502 173 "-" "NuGet .NET Core MSBuild Task/5.3.0 (Linux 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019)" "10.244.2.1"
...
I think that while a restore is running, there are to many request per seconds.
It would be a good practise to run the container as a non root user
I found this documentation on the nginx docker hub:
It is possible to run the image as a less privileged arbitrary UID/GID. This, however, requires modification of nginx configuration to use directories writeable by that specific UID/GID pair:
$ docker run -d -v $PWD/nginx.conf:/etc/nginx/nginx.conf nginx
where nginx.conf in the current directory should have the following directives re-defined:
pid /tmp/nginx.pid;
And in the http context:
http {
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
...
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.