Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Docker Hub publishing as a GitHub Action #992

Merged
merged 1 commit into from
May 10, 2024

Conversation

JimDabell
Copy link

Description

This automatically builds a multi-arch image and pushes it to Docker Hub whenever a new release is published.

Required settings:

The REGISTRY_IMAGE GitHub Actions environment variable should contain the image name, e.g. kritishdhaubanjar/dynamodb-dashboard.

The DOCKER_USERNAME GitHub Actions secret should contain your Docker Hub username.

The DOCKER_PASSWORD GitHub Actions secret should contain a Docker Hub access token with Read and Write permissions.

Related Issue

Fixes #618

Motivation and Context

This automatically publishes amd64 and arm64 images to Docker Hub directly from GitHub. This means that people using arm64 (e.g. Apple Silicon users) can just pull the image and run it without any CPU emulation.

How Has This Been Tested?

I published the image, then pulled it and ran it.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

This automatically builds a multi-arch image and pushes it to Docker Hub
whenever a new release is published.

Required settings:

The `REGISTRY_IMAGE` GitHub Actions environment variable should contain
the image name, e.g. `kritishdhaubanjar/dynamodb-dashboard`.

The `DOCKER_USERNAME` GitHub Actions secret should contain your Docker
Hub username.

The `DOCKER_PASSWORD` GitHub Actions secret should contain a Docker Hub
access token with Read and Write permissions.

Fixes #618
@kritish-dhaubanjar kritish-dhaubanjar merged commit f749a48 into kritish-dhaubanjar:main May 10, 2024
@JimDabell JimDabell deleted the docker-build branch May 10, 2024 07:56
@kritish-dhaubanjar
Copy link
Owner

🚀 Awesome! Thank you! I've added 1 environment variable and 2 secrets as instructed. I'll do a new release very soon.

@kritish-dhaubanjar
Copy link
Owner

The action successfully published the images for different architecture:

image

Thank you!

@JimDabell
Copy link
Author

Great, I’ve pulled it and it looks like it’s working here thanks!

@kritish-dhaubanjar kritish-dhaubanjar added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't support linux/arm64
2 participants