feature request: adding a devbox install command

This issue has been tracked since 2022-10-26.

following the thread at #226
(created for tracking)

devbox install or another similar command as alternative to

devbox shell --config /devbox/devbox.json -- echo "Devbox Store Populated"

Because the command above is only run to install dependencies and populate the store with binaries of the dependency. However, the command does not reflect the intention. So this can be summarized in an alternative simpler command.

Lagoja wrote this answer on 2022-11-03

Duplicate of issue #22. Linking them to track in one place

vsoch wrote this answer on 2022-11-09

Is this still open / not added yet? I'm building devbox into a container and would hugely like this- I want to install stuffs without the shell! Do y'all need/want help?

vsoch wrote this answer on 2022-11-09

okay I think I have a cheap workaround for this (at least to install in docker). You can basically do shell (and that will do the install) but then provide a command that will run and exit. For example in my Dockerfile I do:

$ devbox shell -- echo "Finished install."

which I think is what i see you doing above! But I agree it would be much nicer to have an intuitive "install" that does that without the user having to think about a hack.

mohsenari wrote this answer on 2022-11-20

@vsoch I agree that's a good workaround. We recently added scripts in devbox.json that you can run with devbox run command. With that in place we now have 3 ways of running a command in devbox:

  1. devbox shell and then run a command
  2. devbox shell -- <command>
  3. devbox run <script>

We're now working to make sure all three methods sets up the exact same shell environment. Right now there are very subtle differences. Once that's done we will implement devbox install. But for the time being, you can use the workaround and also alias it so that makes it easier to use.

alias "devbox-install"="devbox shell -- echo \"finished install\""
vsoch wrote this answer on 2023-03-12

Please keep the issue open Mr. Bot, thanks!

More Details About Repo
Owner Name jetpack-io
Repo Name devbox
Full Name jetpack-io/devbox
Language Go
Created Date 2022-08-18
Updated Date 2023-03-31
Star Count 4960
Watcher Count 19
Fork Count 68
Issue Count 42

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date