Scarf Gateway is a service that provides a central access point to your containers and packages, no matter where you host them.
In this guide, you will learn:
- How to create track pulls of your Docker containers with Scarf
- How to create a tracking pixel to track views of your package's documentation
- How to download your packages and fetch associated pixels
- You will need to sign up for a Scarf account. You can sign up with a valid email address or your GitHub account.
- The container you're looking to track must be published to an existing public registry, eg Docker Hub, GitHub Container Registry.
This guide will use the
Creating a Docker Package
Using Scarf, users can pull your Docker container images via Scarf Gateway using your custom domain.
Once signed in to Scarf, navigate to the home page.
Click plus icon in the top navigation, then select
In the first drop-down click on the package type you would like to create. For this section you will click
Enter the current pull command for your Docker container. The Docker command for the
docker pull hello-world.
Optional: You can add a custom domain or use the domain provided by Scarf Gateway.
Submitbutton to be redirected to a success screen with some additional information as to what you can do next.
Click on on
Go to your packageto view your package details view.
Now you’re all set to start tracking your Docker images with Scarf. Any time your image is downloaded, Scarf will report some basic information:
- System and OS statistics of your users
- Company information of your users
- Downloads by versions/tags
In the next section, you will create a tracking pixel that can be added to your project’s documentation or any other web properties associated with your project.
Creating a Tracking Pixel for Your Package
Tracking pixels are used to leverage the web traffic from your project’s documentation to learn which companies are using your software.
Navigate to https://scarf.sh/home.
Pixels can be created from two locations, one is directly from the packages details view. In top menu click on
Packages. Then in the next screen find our package
hello-worldand click on
View details. on the next screen scroll down to the
Tracking Pixelbox and click
Create pixel. The second way is to click plus icon in the top navigation, then select
You will now see the create pixel page. For this example we'll name our pixel
Then attach it to our the newly created
hello-worldpackage. (if you came to the
create pixel pagevia
package details pagethis will be automatically selected)
Copy the newly created pixel
<img>tag and add it to your website, documentation, or any other web properties associated with your project.
For more information on Tracking Pixels see the Documentation Insights section of our docs.
Downloading Packages and Fetching Associated Pixels
In this section you will download your package with the pull command found in your package dashboard to start fetching data.
- Navigate to your package details view.
- Copy the Pull command.
Navigate to a terminal on your computer and run the Pull command. Note: Make sure the docker daemon is running on your computer.
Back to the package details view and click on
View Alytics. You should now see the Package Insights starting to populate with data. It may take a few minutes before you see data pulled in. Every time a user pulls your Docker container images from Scarf Gateway the data in your Package Insights will be updated.