Improve Dockerfile reproducibility and add CI build validation#3
Conversation
Co-authored-by: hypnotoad08 <842086+hypnotoad08@users.noreply.github.com>
|
@copilot my update script would need to change a well, I believe it updates the dockerfile |
Co-authored-by: hypnotoad08 <842086+hypnotoad08@users.noreply.github.com>
You're absolutely right! I've updated the update.yml workflow to handle the new ARG format. The script now:
Fixed in commit f789801. |
|
@copilot ok so I now have an update action to check for new versions of openaudible, a dockerfile build script, and a docker publish script? |
Yes, exactly! You now have three GitHub Actions workflows:
The update workflow will automatically create commits when new versions are detected, which will then trigger the publish workflow to build and push the new image. |
|
@copilot I don't think changing COPY root/ /root/ from COPY /root / is a great idea if the current copy works correctly |
Co-authored-by: hypnotoad08 <842086+hypnotoad08@users.noreply.github.com>
You're absolutely right - I've reverted the COPY command back to the original |
|
@copilot doesn't my docker-publish.yml need updating if I am building now in a new action? |
Good catch! Yes, |
|
@copilot is the new docker-build action needed then? or is it better practice to have separate actions? |
Having separate actions is better practice. Here's why: docker-build.yml (PR validation):
docker-publish.yml (production):
Keeping them separate means faster PR checks and clearer separation of concerns. The alternative would be one workflow with complex conditionals, which is harder to maintain. |
|
@copilot then my publish needs updated with this pr |
Co-authored-by: hypnotoad08 <842086+hypnotoad08@users.noreply.github.com>
|
@copilot ok so this warning is ok? WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load |
Yes, that warning is completely fine! It's expected behavior for the PR validation workflow. The docker-build.yml workflow intentionally uses |
Consolidates Dockerfile layers, makes OA version build-time configurable, and adds PR build validation workflow. Also updates the automated update workflow to handle the new Dockerfile format and removes duplicate PR triggers from the publish workflow.
Dockerfile Changes
ARG OA_VERSION=4.6.3and exposed viaENVfor runtime accessDEBIAN_FRONTEND=noninteractive, removedapt-get dist-upgrade, addedset -eux--no-install-recommendsfor apt installsCOPY /root /format as it works correctlyCI Workflow
Added
.github/workflows/docker-build.ymlthat builds (no push) on PRs to validate Dockerfile changes.Update Workflow Changes
Updated
.github/workflows/update.ymlto handle the newARG OA_VERSIONformat:ARG OA_VERSION=orENV OA_VERSION=formatsPublish Workflow Changes
Updated
.github/workflows/docker-publish.ymlto remove duplicate PR builds:pull_requesttrigger to avoid duplication with the dedicateddocker-build.ymlworkflowOriginal prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.