One Docker command manages a single image, but with Docker Compose, one command can manage multilple images. Docker Compose is a tool for defining and running multi-container Docker applications on a single server. Docker Compose leverages YAML-based configuration files to define the settings for multiple images in one file. An entire ProGet installation can be set up using Docker Compose.
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.
Docker Compose must also be installed. If you don't already have Docker Compose installed, you can get installation instructions for your specific Linux distribution from Docker.
Note that Docker and Docker Compose commands generally have to be issued by members of the Docker group or with root/sudo privileges. 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.
In this example, ProGet is installed using the same installation settings as the instance installed in the Linux and Docker Installation Guide.
To install ProGet using Docker Compose:
docker-compose.yml
(see our example compose file).docker-compose.yml
to.docker-compose up -d db
.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'
docker compose up -d
.To upgrade ProGet that was set up using Docker Compose:
docker-compose.yml
.docker-compose up -d
.Docker Compose will handle the difference in image versions and pull the new image, and restart the ProGet image. The new ProGet image will automatically upgrade the database schema upon start of the image.
To uninstall ProGet that was set up using Docker Compose:
docker-compose.yml
.docker-compose down
.This will stop all images listed in your compose file, remove the containers, and remove the network defined in your compose file. This will not remove the locally cached images or the persisted files that were specified in your compose volumes. You will need to manually remove these afterwards.
When creating your docker-compose.yml
using this example, you will need to set your SQL password (<YourStrong!Passw0rd>
) and the ProGet version (<ProGet Version>
). You may also need to update the volumes to meet your environment.
Note: This example specifies the free SQL Express edition. This is adequate for most ProGet installations, but you can use any other edition, if you have the license for it.
version: '3.8'
services:
db:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: proget-sql
restart: unless-stopped
ports:
- "1433:1433"
networks:
proget-network:
aliases:
- proget-sql
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: <YourStrong!Passw0rd>
MSSQL_PID: Express
# Optional if using persisted storage locations (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver15&pivots=cs1-bash#persist)
# volumes:
# - ./proget-sql/data:/var/opt/mssql/data
# - ./proget-sql/log:/var/opt/mssql/log
# - ./proget-sql/secrets:/var/opt/mssql/secrets
pg:
image: proget.inedo.com/productimages/inedo/proget:<ProGet Version>
container_name: proget
restart: unless-stopped
environment:
SQL_CONNECTION_STRING: Data Source=proget-sql; Initial Catalog=ProGet; User ID=sa; Password=<YourStrong!Passw0rd>
ports:
- "80:80"
networks:
proget-network:
aliases:
- proget
# Update this path to persist your proget packages storage
volumes:
- ./proget-packages:/var/proget/packages
depends_on:
- db
networks:
proget-network:
name: proget-network
Is this documentation incorrect or incomplete? Help us by contributing!
This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.