Comments (12)
can show your docker-compose file or docker run command please? @alphaDev23
from docker-nuget-server.
Yes. Both a domain name and IP were used. The IP below is commented out. The yml file is properly formatted but does not appear below because of the comment form.
version: '3'
services:
nuget-server:
container_name: nuget_server
image: idoop/docker-nuget-server:latest
network_mode: "host"
restart: always
environment:
SERVER_PORT: "8084"
SERVER_NAME: "x.x.x.x"
WORKER_PROCESSES: "2"
NUGET_API_KEY: "243546"
#volumes:
#- ./db:/var/www/simple-nuget-server/db
#- ./packagefiles:/var/www/simple-nuget-server/packagefiles
#- ./nginx-etc:/etc/nginx
ulimits:
nproc: 8096
nofile:
soft: 65535
hard: 65535
from docker-nuget-server.
If you use SERVER_PORT, please set SERVER_NAME value like domain:port
or ip:port
format. @alphaDev23
version: '3'
services:
nuget-server:
container_name: nuget_server
image: idoop/docker-nuget-server:latest
network_mode: "host"
restart: always
environment:
SERVER_PORT: "8084"
# ip:port
SERVER_NAME: "x.x.x.x:8084"
WORKER_PROCESSES: "2"
NUGET_API_KEY: "243546"
#volumes:
#- ./db:/var/www/simple-nuget-server/db
#- ./packagefiles:/var/www/simple-nuget-server/packagefiles
#- ./nginx-etc:/etc/nginx
ulimits:
nproc: 8096
nofile:
soft: 65535
hard: 65535
from docker-nuget-server.
Same result. When testing with the source set to '127.0.0.1:8084' (server name and port are external, e.g. 192.168.1.2:8084), I receive the following in the docker logs and there are no errors (return result is correct):
nuget_server | 127.0.0.1 - - [22/Feb/2019:17:54:32 +0000] "GET / HTTP/1.0" 200 378 "-" "NuGet/2.8.7.0 (Unix 4.4.0.128)" "-"
nuget_server | 127.0.0.1 - - [22/Feb/2019:17:54:32 +0000] "GET /FindPackagesById()?$filter=IsLatestVersion&$orderby=Version%20desc&$top=1&id='WIX' HTTP/1.1" 200 485 "-" "NuGet Command Line/2.8.7.0 (Unix 4.4.0.128)" "-"
nuget_server | 127.0.0.1 - - [22/Feb/2019:17:54:32 +0000] "GET /$metadata HTTP/1.0" 200 4509 "-" "NuGet/2.8.7.0 (Unix 4.4.0.128)" "-"
nuget_server | 127.0.0.1 - - [22/Feb/2019:17:54:32 +0000] "GET /FindPackagesById()?id='WIX' HTTP/1.1" 200 485 "-" "NuGet Command Line/2.8.7.0 (Unix 4.4.0.128)" "-"
nuget_server | 127.0.0.1 - - [22/Feb/2019:17:54:32 +0000] "GET /FindPackagesById()?id='WIX' HTTP/1.1" 200 485 "-" "NuGet Command Line/2.8.7.0 (Unix 4.4.0.128)" "-"
When the server name:port (and source) is set to an external server IP, e.g. 192.168.1.2:8084, there are no logs and the 403 FORBIDDEN error is displayed..
The service is listening on all interfaces:
ss -taln |grep 8084
LISTEN 0 128 *:8084 :
Please advise.
from docker-nuget-server.
Is there any update on this issue?
from docker-nuget-server.
@alphaDev23 I'm sorry to reply you so long.But I use this image run in Docker 18.09
on CentOS 7
and Ubuntu 1804
is OK.Can you describe your operating environment in detail?
from docker-nuget-server.
I'm getting exact the same problem.
from docker-nuget-server.
@paulvanbladel, the compose file that @idoop provided 14 days ago does now work. I do not know why it was failing before.
Edit: Try 'dotnet nuget push PACKAGE -s http://IP:PORT/ -k APIKEY'
from docker-nuget-server.
Same Issue here:
nuget push Package -source https://ps.domain.at -apikey xxxx
Pushing Package to 'https://ps.domain.at'...
PUT https://ps.domain.at/api/v2/package/
Forbidden https://ps.domain.at/api/v2/package/ 310ms
Response status code does not indicate success: 403 (Forbidden).
Compose:
version: '3'
services:
nuget:
image: idoop/docker-nuget-server
deploy:
labels:
- "traefik.port=80"
- "traefik.docker.network=proxy"
- "traefik.frontend.rule=Host:ps.domain.at"
- "traefik.backend=nuget"
- "traefik.frontend.entryPoints=http,https"
- "traefik.frontend.passHostHeader=true"
- "traefik.frontend.whiteList.useXForwardedFor=true"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.frameDeny=true"
- "traefik.frontend.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.frontend.headers.STSSeconds=31536000"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
replicas: 1
networks:
proxy:
aliases:
- nuget
volumes:
- nuget-db:/var/www/simple-nuget-server/db
- nuget-packagefiles:/var/www/simple-nuget-server/packagefiles
#- nuget-nginx:/etc/nginx
environment:
- NUGET_API_KEY="Telekom01"
- UPLOAD_MAX_FILESIZE="50M"
- SERVER_NAME="ps.domain.at"
networks:
proxy:
external: true
default:
driver: overlay
volumes:
nuget-db:
driver: local-persist
driver_opts:
mountpoint: /data/docker/ps/db
nuget-packagefiles:
driver: local-persist
driver_opts:
mountpoint: /data/docker/ps/packages
from docker-nuget-server.
@Berndinox If response code is 40x, please try host
network mode first.
from docker-nuget-server.
Thanks for the fast reponse. The Problem is, network "host" ist not possible, cause there is traefik proxy in front of handling the ssl certificates and the nuget container should not be addressable directly.
from docker-nuget-server.
@alphaDev23 @paulvanbladel @Berndinox
Now can use BASE_URL
env for forward reverse proxy.
from docker-nuget-server.
Related Issues (10)
- search route doesent work HOT 1
- docker-compose not working adding ports with each start HOT 2
- Unable to download package "Invalid Port" HOT 2
- SERVER_PORT environment variables does not work HOT 9
- Attempts to download the nupkg have failed HOT 6
- Permission in External Volumes HOT 3
- 500 Internal Server Error HOT 4
- bug in entrypoint - BASE_URL duplicates HOT 1
- bug in entrypoint - SERVER_PORT HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nuget-server.