Sign inSign up

tunisiano187/phpnuget

By tunisiano187

•Updated over 5 years ago

Create Phpnuget server in docker

Image
0

328

tunisiano187/phpnuget repository overview

Host your own nuget feed with this docker image running phpnuget from kendar.org.

  1. Git the Project to your local machine:
git clone https://github.com/MarkProminic/Docker-phpnuget.git
  1. Enter the project Directory
cd Docker-phpnuget
  1. Build the Project:
docker build -t myorganziation/phpnugetv4.1 .
  1. Start the container with:
docker run -d -p 80:80  -p 443:443 -e DOMAINS="chocolatey.my.domain.net" -e VHOST1="chocolatey.my.domain.net" -e WEBMASTER_MAIL="[email protected]" -e STAGING="false" -v /choco/:/app/phpnuget/data/ --dns 1.1.1.1 --name MyPHPNuGETV2 myorganziation/phpnugetv4.1

If you want to use your own SSL cert and key, then you need to place them inside the path that you have mounted as the data store. in the Above example it would be /choco/ssl

Naming your files privkey.pem and fullchain.pem will allow you to run the container without specifying the environmental variables. If you need to specify the names, use the Environmental variabels as decribed below.

docker run -d -p 80:80  -p 443:443 -e DOMAINS="chocolatey.my.domain.net" -e VHOST1="chocolatey.my.domain.net" -e WEBMASTER_MAIL="[email protected]" -e STAGING="false" -v /choco/:/app/phpnuget/data/ -e SSLCRT=fullchain.pem -e SSLCRT=privkey.pem --dns 1.1.1.1 --name MyPHPNuGETV2 myorganziation/phpnugetv4.1

During the first few minutes the site will load a temporary SSL while Let's Encrypt Fetches a live certifcate. Simply refresh the page after a few minutes to see an updated cert.

If you need to store large static files you can mount a host path as follows:

docker run -d -p 80:80  -p 443:443-e DOMAINS="chocolatey.my.domain.net" -e VHOST1="chocolatey.my.domain.net" -e WEBMASTER_MAIL="[email protected]" -e STAGING="false" -v /choco/:/app/phpnuget/ -v /data/:/app/phpnuget/data/ -v /static/:/app/static/ -e STAGING="true"  --dns 1.1.1.1 --name MyPHPNuGETV2 myorganziation/phpnugetv4.1

Where /static is a path on the host and /app is symlinked to /var/www/html in the container.

Environmental Variables:

VaribleValue
VHOST1This is to specify which virutalhost the SSL should be applied to.
DOMAINSThis is to specify all the domains that should be issued.
STAGINGSupposed to only pull staging certifcates.
WEBMASTER_MAILIs a required field for Let's Encrypt.
SSLCRTfile name of a PEM formatted SSL CERT to use in lieu of Let's Encrypt, if using the /choco directory above, then place it inside of that folder ssl/
SSLKEYfile name of a PEM formatted SSL KEY to use in lieu of Let's Encrypt, if using the /choco directory above, then place it inside of that folder plus ssl/
  1. Point your web browser to http://<yourhost>/setup.php

  2. Change settings and hit "Install".

Notes
Nb! Leave "Application Path:"as is (phpnuget)
Field "php-cgi.exe (for IIS):"could be emptied.
  1. Login at http://<yourhost> and start uploading packages.

Happy nugetting!

Credit where due:

Base Dockerfile Idea: https://github.com/tunisiano187/Docker-phpnuget⁠

Let'sEncrypt on Apache inside of Docker: https://github.com/BirgerK/docker-apache-letsencrypt⁠

Tag summary

Content type

Image

Digest

Size

169.3 MB

Last updated

over 5 years ago

docker pull tunisiano187/phpnuget