Comments (8)
Can confirm that it works as expected now.
from docker.
I don't get what is going on exactly, however some things to note:
-
Output of
composer gloabl require -vvv phpmetrics/phpmetrics
is mostly identical, except for hashes.
FROM composer:1.2.2
RUN composer global require 'phpmetrics/phpmetrics'
RUN stat /composer/vendor
CMD [""]
ENTRYPOINT ["phpmetrics"]
gives stat: can't stat '/composer/vendor': No such file or directory
here, whereas the directory exists when using composer/composer:1.1
- Might be this from the Dockerfile reference section on VOLUME:
Note: If any build steps change the data within the volume after it has been declared, those changes will be discarded.
As the volume is declared in the base image and I extend it, my RUN
command writes into the volume and the changes are discarded immediately.
- Conclusion: I think
/composer
should not be annotated asVOLUME
in the base image at all, so users can change its contents when extending from this image. A different use-case when this was desirable could beADD
ingcomposer.*
and runningcomposer install
duringdocker build
for caching purposes.
from docker.
Thank you for reporting this and taking the time to thoroughly investigate the issue.
I am honestly not sure as to what the common conventions are regarding declaring volumes in official base images.
Perhaps it would be best if we did not declare a volume at all.
Please give me the time to get some feedback from some more experienced Docker folks before taking any actions. I will try to get back to you with an answer/solution asap :-)
from docker.
Thanks for the quick response :) I saw that you explained your line of thought in the original pull request but did not receive feedback on that in particular.
So it's probably best to get some expert knowledge here, happy to wait!
from docker.
@yosifkit | alcohol: We usually only declare volumes for things like database storage.
I'll drop the VOLUME
declaration.
from docker.
@janpapenbrock the VOLUME
declaration has been dropped, but it can take a while before the change gets merged. Keep an eye out :-)
from docker.
Awesome, thank you!
from docker.
Good to hear :-)
from docker.
Related Issues (20)
- New Composer tag: 2.5.7 HOT 2
- Update vendor folder on docker volume for later usage HOT 1
- New Composer tag: 2.5.8
- Documentation incorrect for multi-stage builds HOT 1
- New Composer tag: 2.6.0
- New Composer tag: 2.6.1
- New Composer tag: 2.6.2
- Tags missing on Docker hub HOT 3
- New Composer tag: 2.6.3
- New Composer tag: 2.2.22
- New Composer tag: 1.10.27
- New Composer tag: 2.6.4
- New Composer tag: 2.6.5
- getting php dependency on composer image HOT 1
- Different container images pushed under the same tag HOT 2
- New Composer tag: 2.6.6
- Composer 2.6 with PHP 8.3.0 difficulty building gd extension HOT 1
- New Composer tag: 2.2.23
- New Composer tag: 2.7.0 HOT 3
- New Composer tag: 2.7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.