Comments (4)
Interesting idea. (Codespaces are not including those commands in the image, but run them to warm-up a VM.)
from cli.
@metaskills To be clear, devcontainers/spec#60 adds support for Dev Container Features to trigger lifecyle events when the container is created. That allows you to use Features with "pre-built Codespaces" to do this kind of thing just like you can now by just adding that property into devcontainer.json.
So - you can do this without Features in pre-built Codespaces today... its just not quite as reusable.
But, in all cases, the lifecycle hooks are executed when a container is created (not the image). Pre-built Codespaces are cached fully created containers and source code volumes so, the container already exists. This is raising a broader consideration of some variant of pre-built codespaces that would work locally... which implies some new way of archiving contents or putting everything in the image.
@metaskills @andreiborisov Note that devcontainer.json data is in fact stored on the image when you pre-build an image (not a codespace) using the dev container CLI. It won't execute it and store it in the image, but just referencing the image would trigger those events when the container was created. This landed in the last month (its #188), so it's quite new.
from cli.
DARN! I was about to do a test using onCreateCommand
to make our Codespaces prebuilds better by installing package dependencies ahead of time for the developers. Using a hack mentioned here (devcontainers/spec#85 (comment)) but if these are not being run by the CLI because the spec (devcontainers/spec#60) has yet to support it... I'm out of luck for now.
I'm so excited by internal features and prebuilds together. Please help me make things easy for our DX teams.
from cli.
But, in all cases, the lifecycle hooks are executed when a container is created (not the image).
✅ That was very helpful. Of course 🤦♂️ it works that way. I might have to re-consider some of the optimizations I was looking for in diff ways outside of lifecycle hooks.
from cli.
Related Issues (20)
- Ability to provide version to publish HOT 6
- Speed up installing dotfiles by loading only latest commit
- project-name changed after updating 0.56 -> 0.60 HOT 10
- obtuse and confusing error with local feature under WSL HOT 4
- Feature Request: Allow devcontainer up to Start Only the Specified Service and Its Dependencies HOT 4
- Adding labels to containers build by devcontainer cli HOT 5
- `compose.yaml` `name` breaks when using vars `${VAR}` HOT 3
- Forward docker credentials from docker cred helper HOT 1
- Add option to get the info on running containers HOT 2
- Apply --remove-existing-container before initializeCommand
- Error when devcontainer up HOT 2
- Push in quay.io/buildah/stable HOT 3
- 2244 HOT 2
- Consistently getting: command failed: {0} Exit code 1 Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker' HOT 1
- `runArgs` in Dev Containers image isn't shared to `.devcontainers.json` workspace HOT 3
- Option --omit-config-remote-env-from-metadata is not documented HOT 2
- Devcontainer over ssh hanging forever when wsl2 vm has freezed. HOT 2
- OpenTelemetry tracing HOT 2
- Issues executing binary inside container with devcontainer exec HOT 5
- devcontainer up not working with podman and docker-compose file HOT 5
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 cli.