Fix Dockerfile: uv.lock wildcard, healthcheck port expansion, CMD shell form#8
Draft
Fix Dockerfile: uv.lock wildcard, healthcheck port expansion, CMD shell form#8
Conversation
…CMD shell form Co-authored-by: ochui <21917688+ochui@users.noreply.github.com> Agent-Logs-Url: https://github.com/flowdacity/queue-server/sessions/e4d7c845-1368-447a-89ac-82f076792a42
Copilot
AI
changed the title
[WIP] Fix Dockerfile to ensure uv.lock exists and improve healthcheck
Fix Dockerfile: uv.lock wildcard, healthcheck port expansion, CMD shell form
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three correctness issues in the Dockerfile around lock file handling, runtime port resolution in the healthcheck, and shell variable expansion in the startup command.
Changes
uv.lock*→uv.lock: Wildcard silently succeeds if the lockfile is absent, undermining--locked. Explicit copy fails the build fast ifuv.lockis missing.HEALTHCHECK port resolution:
${PORT}inside a Python string literal is not expanded by the shell — the variable never reaches the Python process. Replaced withos.environ.get('PORT', '8080')so the port is read from the container's environment at runtime.CMD exec form → shell form:
CMD ["exec uvicorn ... --port ${PORT}"]withENTRYPOINT ["sh", "-c"]passes the array element as a literal string with no variable expansion. Shell formCMD exec uvicorn ... --port ${PORT}lets the shell expand${PORT}correctly.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.