ProGet for Linux is available using our official Docker image. This set-up guide will also help you prepare to use Docker with ProGet, even on Windows.
Docker must be installed and the docker daemon running on your server. If you don't already have Docker installed, you can get installation instructions for your specific Linux distribution from Docker.
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.
First, you'll need to create a network for the SQL Server and ProGet containers
docker network create proget
ProGet requires a SQL Server database. You can either host this database externally or simply use a SQL Server Docker image; it doesn't matter how it's hosted, as long as your ProGet instance can access it. For example, to start up a SQL Server container that you only intend to use with ProGet, use the command:
docker run --name proget-sql \
-e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=‹YourStrong!Passw0rd›' \
-e 'MSSQL_PID=Express' --net=proget --restart=unless-stopped \
-d mcr.microsoft.com/mssql/server:2019-latest
Note: This example specifies the free SQL Express edition. This is adequate for most ProGet installations, but you can use any other edition as well if you have the license for it.
Once you have a SQL Server instance up and running, you'll need to create an empty database. For example, to create a database called ProGet on the SQL Server instance running in the proget-sql container:
docker exec -it proget-sql /opt/mssql-tools/bin/sqlcmd \
-S localhost -U SA -P '‹YourStrong!Passw0rd›' \
-Q 'CREATE DATABASE [ProGet] COLLATE SQL_Latin1_General_CP1_CI_AS'
Note: You can create the database however you want, but to avoid issues make sure you specify its collation as SQL_Latin1_General_CP1_CI_AS.
You'll need to have a valid license key once you get ProGet up and running. You are welcome to use either a license key that you already have or request a new one from my.inedo.com.
The ProGet Docker image contains a web server and a background service. To get this 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 run -d -v proget-packages:/var/proget/packages -p 80:80 --net=proget \
--name=proget --restart=unless-stopped \
-e SQL_CONNECTION_STRING='Data Source=proget-sql; Initial Catalog=ProGet; User ID=sa; Password=‹YourStrong!Passw0rd›' \
proget.inedo.com/productimages/inedo/proget:<version>
Since ProGet v5.2.12, the inedo/proget
image is hosted using the .NET Core runtime. Previously, it was hosted using the Mono runtime. If you encounter issues after upgrading to v5.2.12 or later, try using inedo/progetmono
instead.
See our blog article about .NET Core/.NET 5 support for more information.
Parameter | Description |
---|---|
-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. |
--net=proget | Putting the containers into a Docker network lets them see each other and prevents other Docker containers from accessing them. |
--restart=unless-stopped | Tells Docker to restart the container unless it is explicitly topped using docker stop . This makes the container automatically restart after the host reboots. |
-e | This tells docker to pass the proceding environment variables to the container. See the full list of supported environment variables. |
-v proget-packages:/var/proget/packages | Persists ProGet's packages in the proget-packages Docker volume. Note that a Docker volume is essentially just a persistent, data-only container, and is the preferred mechanism for persisting data generated by a running Docker container. If you would prefer to mount a host file system directory directly instead, you may replace proget-packages with a host path, such as /var/proget/packages . |
-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; make sure to change the BasedUrl in Admin > Advanced Settings if the ports aren't the same. |
--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. |
proget.inedo.com/productimages/inedo/proget:<version> | This is the repository and tag for ProGet. Just replace <version> with the appropriate ProGet release number. Note that downgrades will only work if there have been no database schema changes. As mentioned above, you can use progetcore instead of proget here if you'd like to use the .NET Core based image. |
Environment Variable | Description |
---|---|
SQL_CONNECTION_STRING | The connection string for your SQL Server. The value specified in the example here assumes you are using the proget-sql container. To connect to a different instance, just change this connection string to the appropriate value. Enclosed in single quotes. Example: -e SQL_CONNECTION_STRING='Data Source=proget-sql; Initial Catalog=ProGet; User ID=sa; Password=‹YourStrong!Passw0rd›' |
SQL_CONNECTION_STRING_FILE | Can be used instead of the connection string above to read the connection string from file location within the container. This facilitates the use of Docker secrets to prevent passing clear text passwords in a docker stack file. A docker secret must be set first and 'called' within the stack file. Example: -e SQL_CONNECTION_STRING_FILE='/home/proget/secrets/proget_connection_string' |
TZ | Used to specify the timezone of the container. Can be set to any TZ database name Example: -e TZ='America/Denver' |
PROGET_ENCRYPTION_KEY | This specifies the 32-character hex encryption key ProGet uses to store some secrets. Example: -e PROGET_ENCRYPTION_KEY='37D27A670394F7D82CE57F1F07D69747' |
PROGET_ENCRYPTION_KEY_FILE | This specifies the full path of a text file that contains the encryption key described above. Example: -e PROGET_ENCRYPTION_KEY_FILE='/home/proget/secrets/proget_encryption_key' |
For ProGet 5.2 and earlier, use PROGET_DB_TYPE
instead of SQL_CONNECTION_STRING
, and also add -e PROGET_DB_TYPE=SqlServer
.
When the container is running, you should be able to browse to the ProGet web UI on the exposed port.
docker stop proget
docker rename proget proget-old
docker pull proget.inedo.com/productimages/inedo/proget:<version>
docker run -d --volumes-from=proget-old \
-p 80:80 --net=proget \
--name=proget --restart=unless-stopped \
-e SQL_CONNECTION_STRING='Data Source=proget-sql; Initial Catalog=ProGet; User ID=sa; Password=‹YourStrong!Passw0rd›' \
proget.inedo.com/productimages/inedo/proget:<version>
docker rm proget-old
The ProGet container will automatically upgrade the database when starting up; this upgrade might take a few minutes, which may appear to cause delays to monitoring processes like Kubernetes probes.
If you run the following command in the ProGet container instead of the normal starting process, the database will be updated, and then the process will exit.
ProGet.Service.exe upgradedb
Or the following in the docker image:
/usr/local/proget/service/ProGet.Service upgradedb
There's some examples on QA#3410 for how to use this with Kubernetes.
If you aren't able to browse to the website, here's a few troubleshooting steps you can try:
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.docker logs proget
- this will display ProGet's log messages. Look for any error or warning messages for clues as to what's wrong.docker restart proget
to stop the container and then restart it.If you need to stop the ProGet container, the docker stop proget
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
command.
ProGet does not handle TLS termination. It is recommended that you use a third party reverse proxy to terminate TLS and forward requests to ProGet. This has the added benefit of allowing multiple websites and applications to be hosted on the same IP address.
Any HTTP reverse proxy can work, but four specific examples are provided below:
Caddy | [Proxy](https://github.com/caddyserver/caddy/wiki/v2:-Documentation#reverse_proxy) | [TLS](https://github.com/caddyserver/caddy/wiki/v2:-Documentation#tls) |
---|---|---|
nginx | [Proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) | [TLS](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/) |
Apache | [Proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) | [TLS](https://httpd.apache.org/docs/2.4/mod/mod_ssl.html) |
HAProxy | [Proxy](https://www.haproxy.com/blog/the-four-essential-sections-of-an-haproxy-configuration/) | [TLS](https://www.haproxy.com/blog/haproxy-ssl-termination/) |
Although ProGet's codebase is largely platform-independent, there are a few platform-specific features from the Windows version that had to be omitted:
docker restart proget
command.Is this documentation incorrect or incomplete? Help us by contributing!
This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.