Getting Started with ProGet for Linux
Starting with ProGet 4.0, we plan to officially support Linux installations.
You can test drive ProGet for Linux right now using our official Docker image. This is considered a beta, and should not yet be used in a production environment.
Docker must be installed and the docker daemon running on your server. If you don't already have Docker installed, you can get install instructions for your specific distro here.
Once Docker is up and running, you are ready to continue. Note that Docker commands generally have to be issued by members of the docker group or with root/sudo privileges, so if you encounter errors with these commands make sure your account is in the docker group (adduser myusername docker and then log out and back in) or you are issuing them with the appropriate sudo/su depending on your configuration.
You'll need to have a valid license key once you get ProGet up and running. We're still in the process of finalizing how this edition will be licensed, so for the beta you are welcome to use either a license key that you already have, or to request a new one from my.inedo.com.
Starting the ProGet Docker Image
We are currently distributing this beta as a single, self-contained image. To get the image and start it, use the docker run command. If you'd like to just get started right away with our defaults, you can just use the command below as-is, or continue reading for an explanation on the arguments and how to provide additional configuration values.
docker network create proget
docker run -d -v /etc/localtime:/etc/localtime:ro -v /var/proget/db:/var/lib/postgresql/data --net=proget --name=proget-postgres --restart=unless-stopped postgres:9.5
docker run -d -v /etc/localtime:/etc/localtime:ro -v /var/proget/packages:/var/proget/packages -v /var/proget/extensions:/var/proget/extensions -p 80:80 --net=proget --name=proget --restart=unless-stopped inedo/proget:latest
|-d||Starts the container in detached mode. Without this argument, Docker will block your current terminal session and output ProGet's logs to your terminal.|
|-v /etc/localtime:/etc/localtime:ro||Allows the Docker container to inherit the time zone of the host server.|
|-v /var/proget/db:/var/lib/postgresql/data||Mounts /var/proget/db as the location of PostgreSQL's storage on the host server. You can omit this option if you want Docker to create the volume in /var/lib/docker/volumes with a random name.|
|--net=proget||Putting the containers into a Docker network lets them see each other and prevents other Docker containers from accessing them.|
|--name=proget-postgres||Names the container proget-postgres, which is the default hostname that ProGet connects to on Linux. If you choose a different name or decide to host your database server outside of Docker, you will need to specify a connection string using -e PROGET_DATABASE="Server=host.name; Database=databasename; User Id=username; Password=password;"|
|--restart=unless-stopped||Tells Docker to restart the container unless it is explicitly stopped using docker stop. This makes the container automatically restart after the host reboots.|
|-v /var/proget/packages:/var/proget/packages||Mounts /var/proget/packages as the location to store ProGet's repository packages. Like the database path, you can change this, but if it is not persisted explicitly, Docker will choose a location that is hard to get to.|
|-v /var/proget/extensions:/var/proget/extensions||Mounts /var/proget/extensions as the location to store ProGet's extensions. Like the database path, you can change this, but if it is not persisted explicitly, you will not be able to install and use any extensions. See the limitations section below.|
|-p 80:80||Exposes TCP port 80 of the container to port 80 of the host, so that browsers can access the ProGet web application. If you don't want to use port 80, you can change the first port number to whatever you would like.|
|--name=proget||Names the container proget so it can be easily referenced using other Docker commands. If you don't specify a name, Docker will generate one for you.|
|inedo/proget:latest||This is the repository and tag for ProGet on Docker Hub. If you want to run a specific version instead of the latest, just replace latest with the appropriate ProGet release number. Note that downgrades will only work if there have been no database schema changes.|
When the container is running, you should be able to browse to the ProGet web UI on the exposed port.
Upgrading to a new version
docker stop proget
docker rename proget proget-old
docker pull inedo/proget:latest
docker run -d --volumes-from=proget-old -p 80:80 --net=proget --name=proget --restart=unless-stopped inedo/proget:latest
docker rm proget-old
If you aren't able to browse to the website, here's a few troubleshooting steps you can try:
- Run docker ps - this will display all of the currently running Docker containers. If you don't see ProGet listed, then the container isn't running and you can issue a docker logs proget command to display the log messages from when it last ran; there was most likely some kind of initialization error that prevented it from starting up.
- Run docker logs proget - this will display ProGet's log messages. Look for any error or warning messages for clues as to what's wrong.
- Make sure a firewall on the host server isn't blocking requests on the specified port.
- Run docker restart proget to stop the container and then restart it.
Stopping the Container
If you need to stop the ProGet container, the docker stop proget proget-postgres command should do it. You can determine if it is running with the docker ps command. To start the container after it has been created, use the docker start proget proget-postgres command.
Limitations and Known Issues
Although ProGet's codebase is largely platform-independent, there are a few platform-specific features from the Windows version that had to be omitted:
Extension Management - Extensions can be installed from the ProGet web application just
like on Windows installations, but the hosting Docker container must be manually restarted
after the extensions are installed using a
docker restart progetcommand.
- NuGet Source Server - This requires the pdbstr.exe Windows binary, which will not run on Linux short of some kind of emulation layer like Wine.
You may also encounter random bugs as the entire database layer has been ported from SQL Server to PostgreSQL. We're pretty sure we've discovered and fixed most of these issues, but if you encounter any please be sure to let us know.