question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish Docker image as a repository artifact

See original GitHub issue
  • I’ve read the contribution guidelines and agree with them
  • … to my best knowledge, my idea wouldn’t break something for other users
  • … the documentation does not mention anything about my idea
  • … there are no open or closed issues that are related to my idea

Description

It will be great to publish a Docker image as a package of this repository.

Use Cases

It will be easier for sponsors to consume the insiders version since GitHub will require authentication in order to pull the image so only sponsors will be able to pull it.

Screenshots / Mockups

This action should work perfectly for both this repository and the insiders one thanks to ${{ github.event.repository.full_name }}:

name: Publish Docker image
on:
  release:
    types: [published]
jobs:
  push_to_registry:
    name: Push Docker image to GitHub Packages
    runs-on: ubuntu-latest
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
      - name: Push to GitHub Packages
        uses: docker/build-push-action@v1
        with:
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
          registry: docker.pkg.github.com
          repository: ${{ github.event.repository.full_name }}/mkdocs
          tag_with_ref: true

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
squidfunkcommented, Nov 22, 2020

I took the opportunity and refactored the whole build pipeline into multiple workflows. Futhermore, I decided to use GitHub Container Registry, as Docker support is going to be deprecated next year for GitHub Package Registry. Thus, to use it, it may be necessary that you opt-in to the public beta of GHCR. The official image is now dual-released on DockerHub and GHCR:

# Pull from DockerHub
docker pull squidfunk/mkdocs-material 
# Pull from GitHub Container Registry
docker pull ghcr.io/squidfunk/mkdocs-material 

Insiders is now also published as a private container image. You need to login to ghcr.io with a personal access token granting the packages:read scope. Afterwards you can pull the image:

docker login ghcr.io # Enter username and access token
docker pull ghcr.io/squidfunk/mkdocs-material-insiders

I’m marking this issue as resolved. Thank you for your help on this! If you have any trouble or feel that something is missing, don’t hesitate to comment. I hope this improves the Insiders experience. I’ll add some docs in a few minutes.

1reaction
squidfunkcommented, Nov 20, 2020

Awesome, thanks so looking into this! I’ll try to address it this weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quickstart: Store Docker container images in Artifact Registry
Before you begin · Choose a shell · Create a Docker repository · Configure authentication · Obtain an image to push · Add...
Read more >
Artifact Registry: the new way to keep your App ... - Medium
Docker needs access to Artifact Registry to push and pull images. You can use the standalone Docker credential helper tool, docker-credential-gcr , to ......
Read more >
How to push tagged Docker releases to Google Artifact ...
Go to the Google Artifact Registry interface within your project. Create a new repository by hitting the buttona at the top. Tell Google...
Read more >
About registries, repositories, and artifacts - Microsoft Learn
When using Docker or other client tools to pull or push artifacts to an Azure container registry, use the registry's fully qualified URL,...
Read more >
Publish to Google Cloud Artifact Registry - Educative.io
Artifact Registry · Sign in to Google Cloud · Create a new project · Install Google Cloud SDK · Enable Artifact Registry for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found