Skip to content

Add composer to Dockerfile from official composer image#47

Open
shaundrong wants to merge 1 commit into
mainfrom
Add-Copy-Command-For-Composer-2-9
Open

Add composer to Dockerfile from official composer image#47
shaundrong wants to merge 1 commit into
mainfrom
Add-Copy-Command-For-Composer-2-9

Conversation

@shaundrong
Copy link
Copy Markdown

Copy the latest 2.9.x build of composer to the Docker image.

Copy the latest 2.9.x build of composer to the Docker image.
Comment thread Dockerfile
@@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants