Add composer to Dockerfile from official composer image#47
Open
shaundrong wants to merge 1 commit into
Open
Conversation
Copy the latest 2.9.x build of composer to the Docker image.
kurowski
reviewed
May 22, 2026
| @@ -1,4 +1,6 @@ | |||
| FROM mcr.microsoft.com/devcontainers/php:8.3 | |||
| # Copy latest 2.9.x build of composer over the version provided by the microsoft image above | |||
| COPY --from=composer/composer:2.9-bin /composer /usr/bin/composer | |||
Member
There was a problem hiding this comment.
Suggested change
| COPY --from=composer/composer:2.9-bin /composer /usr/bin/composer | |
| COPY --from=composer/composer:2.9-bin /composer /usr/local/bin/composer |
Looks like composer is in /usr/local instead:
myeap2 on UP-1919-publish-portal-documentation-to-all-staff [!?] via 🐘
❯ dce -- /usr/bin/composer --version
OCI runtime exec failed: exec failed: unable to start container process: exec: "/usr/bin/composer": stat /usr/bin/composer: no such file or directory
myeap2 on UP-1919-publish-portal-documentation-to-all-staff [!?] via 🐘
❯ dce -- /usr/local/bin/composer --version
Composer version 2.9.7 2026-04-14 13:31:52
PHP version 8.3.30 (/usr/local/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.
I see we're shipping 2.9.7 and your PR bumps it to 2.9.8:
myeap2 on UP-1919-publish-portal-documentation-to-all-staff [!?] via 🐘
✦ ❯ git diff
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index 240834190..dc9c26a72 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -1,6 +1,6 @@
services:
drupal:
- image: "ghcr.io/uceap/devcontainer-drupal:main"
+ image: "ghcr.io/uceap/devcontainer-drupal:pr-47"
volumes:
- ../..:/workspaces:cached
mariadb:
myeap2 on UP-1919-publish-portal-documentation-to-all-staff [!?] via 🐘
❯ dcr -- /usr/bin/composer --version
...
Composer version 2.9.8 2026-05-13 09:28:38
PHP version 8.3.31 (/usr/local/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.
Were you expecting a bigger update? Were you seeing an older version somewhere?
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.
Copy the latest 2.9.x build of composer to the Docker image.