![]() |
This section provides step-by-step instructions on how to pull and run a Docker image from GitHub Packages for your project. Using Docker from GitHub Packages allows users to run their applications consistently across different platforms, ensuring portability and reducing compatibility issues. A list of possible versions of GitHub packages for WinNet can be accessed here.
Before you begin, ensure you have the following:
read:packages
scope. You can create a PAT from your GitHub settings.Run the following command to authenticate Docker to GitHub Packages using your GitHub username and personal access token:
Replace YOUR_GITHUB_USERNAME
with your GitHub username and set the GITHUB_TOKEN
environment variable to your personal access token.
Use the docker pull
command to download the Docker image from GitHub Packages:
If you want a specific version, replace latest
with the desired tag.
After pulling the image, run a container using the docker run
command:
Here’s a complete example assuming your GitHub username is winnet_user
and you saved your github token in the environment variable GITHUB_TOKEN:
If your application requires persistent storage, you can mount volumes using the -v
flag. For example:
Hence, you can make the run folder accessible to your system, using a folder called "run_test", by:
For more information on using Docker, refer to the Docker documentation.