Add Dockerfile and GHCR publish workflow#218
Conversation
Co-authored-by: amitsaha <512598+amitsaha@users.noreply.github.com> Agent-Logs-Url: https://github.com/amitsaha/gitbackup/sessions/18bf06a1-3421-45a3-a73b-df4a1d29fd7d
|
@copilot how does, "Triggers on release: published;" work? |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
3 similar comments
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@copilot how does, "Triggers on release: published;" work? |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
The The flow is:
This is intentionally different from the
The The flow is:
This is intentionally different from the |
|
@copilot do i need to do any configuration for publishing the docker image to the GHCR? |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
1 similar comment
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@copilot do i need to do any configuration for publishing the docker image to the GHCR? |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
2 similar comments
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
|
@amitsaha The model You can try again without specifying a model (just If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: |
No extra configuration is needed. The workflow uses the built-in The one thing to be aware of is package visibility. The first time the image is pushed, GHCR creates the package as private by default. If you want the image to be publicly pullable without authentication, go to github.com/amitsaha → Packages → gitbackup → Package settings → Change visibility → Public after the first push. That's all — no secrets to create, no tokens to rotate.
No extra configuration is needed. The workflow uses the built-in The one thing to be aware of is package visibility. The first time the image is pushed, GHCR creates the package as private by default. If you want the image to be publicly pullable without authentication, go to github.com/amitsaha → Packages → gitbackup → Package settings → Change visibility → Public after the first push. That's all — no secrets to create, no tokens to rotate. |
|
@copilot Update README with instructions to use the docker image |
amitsaha
left a comment
There was a problem hiding this comment.
Use a non-root user to run gitbackup
Update README with instructions to use the docker image, with volume mounting instructions and also discuss the user access nuances
Co-authored-by: amitsaha <512598+amitsaha@users.noreply.github.com> Agent-Logs-Url: https://github.com/amitsaha/gitbackup/sessions/d0832656-ebd9-442d-b721-40da0fa8ac9a
Done in commit Dockerfile: switched the runtime base from README: added a new "Docker image" subsection under "Installing gitbackup" covering:
Added in commit |
amitsaha
left a comment
There was a problem hiding this comment.
Discuss usage of the image on MacOS, Linux and Windows
Co-authored-by: amitsaha <512598+amitsaha@users.noreply.github.com> Agent-Logs-Url: https://github.com/amitsaha/gitbackup/sessions/d9a5d8e9-a12f-49d2-969c-9738801e5eea
Done in commit
|
Enables
gitbackupto run in containerized environments by adding a Docker image build and automated publish to GitHub Container Registry on release.Changes
Dockerfile— Multi-stage build:golang:1.25compiles a static binary (CGO_ENABLED=0), copied into adebian:bookworm-slimruntime image withgitandca-certificatesinstalled. Runs as a non-root user (nonroot, UID65532) for improved security..github/workflows/docker-publish.yml— Triggers onrelease: published; authenticates toghcr.ioviaGITHUB_TOKEN, derives semver tags (1.2.3,1.2,1) from the release tag usingdocker/metadata-action, then builds and pushes viadocker/build-push-action.README.md— Added a "Docker image" section under "Installinggitbackup" with pull instructions and platform-specific usage guidance for Linux, macOS, and Windows, covering: volume mounting (includingchownfor UID65532on Linux/macOS), HTTPS cloning recommendation (no SSH key management required), SSH key mounting instructions, and shell syntax differences (Bash, PowerShell, Command Prompt).Published image will be available at:
Workflow uses minimal permissions (
contents: read,packages: write).Original prompt
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.