You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[devbox] Correctly pass path to nix and improve README (#2599)
## Summary
`devbox shell` used to (accidentally) change your working directory. We now pass the path to `nix` in a way that retains the current working directory.
Improve README
## How was it tested?
Built and ran locally.
## Is this change backwards-compatible?
Yes.
Want to try out a tool but don’t want the mess? Add it to a Devbox shell.
7
+
---
9
8
10
-
<iframewidth="560"height="315"src="https://www.youtube.com/embed/WMBaXQZmDoA"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen></iframe>
9
+
## What is it?
11
10
12
-
## Compatibility
11
+
Devbox is a command-line tool that lets you easily create isolated shells and containers. You start by defining the list of packages required for your development environment, and devbox uses that definition to create an isolated environment just for your application.
13
12
14
-
Devbox works on:
13
+
In practice, Devbox works simlar to a package manager like `yarn` – except the packages it manages are at the operating-system level (the sort of thing you would normally install with `brew` or `apt-get`).
15
14
16
-
- Linux
17
-
- macOS
18
-
- Windows via WSL2
15
+
Devbox was originally developed by [jetpack.io](https://www.jetpack.io) and is internally powered by `nix`.
Declare the list of tools needed by your project via a `devbox.json` file and run `devbox shell`. Everyone working on the project gets a shell environment with the exact same version of those tools.
24
+
25
+
### Try new tools without polluting your laptop
26
+
27
+
Development environments created by Devbox are isolated from everything else in your laptop. Is there a tool you want to try without making a mess? Add it to a Devbox shell, and remove it when you don't want it anymore – all while keeping your laptop pristine.
28
+
29
+
### Don't sacrifice speed
30
+
31
+
Devbox can create isolated environments right on your laptop, without an extra-layer of virtualization slowing your file system or every command. When you're ready to ship, it'll turn it into an equivalent container – but not before.
32
+
33
+
### Good-bye conflicting versions
34
+
35
+
Are you working on multiple projects, all of which need different versions of the same binary? Instead of attempting to install conflicting versions of the same binary on your laptop, create an isolated environment for each project, and use whatever version you want for each.
36
+
37
+
### Instantly turn your application into a container
38
+
39
+
Devbox analyzes your source code and instantly turns it into an OCI-compliant image that can be deployed to any cloud. The image is optimized for speed, size, security and caching ... and without needing to write a `Dockerfile`. And unlike [buildpacks](https://buildpacks.io/), it does it quickly.
40
+
41
+
### Stop declaring dependencies twice
42
+
43
+
Your application often needs the same set of dependencies when you are developing on your laptop, and when you're packaging it as a container ready to deploy to the cloud. Devbox's dev environments are _isomorphic_: meaning that we can turn them into both a local shell environment or a cloud-ready container, all without having to repeat yourself twice.
44
+
45
+
## Installing Devbox
46
+
47
+
In addition to installing Devbox itself, you will need to install `nix` and `docker` since Devbox depends on them:
22
48
23
49
1. Install [Nix Package Manager](https://nixos.org/download.html). (Don't worry, you don't need to learn Nix.)
24
50
@@ -30,7 +56,6 @@ Devbox works on:
30
56
curl -fsSL https://get.jetpack.io/devbox | bash
31
57
```
32
58
33
-
34
59
## Quickstart: Fast, Deterministic Shell
35
60
36
61
In this quickstart we’ll create a development shell with specific tools installed. These tools will only be available when using this Devbox shell, ensuring we don’t pollute your machine.
@@ -79,12 +104,11 @@ In this quickstart we’ll create a development shell with specific tools instal
79
104
exit
80
105
```
81
106
107
+
## Quickstart: Instant Docker Image
82
108
83
-
## Quickstart: Automatic Docker Image
109
+
Devbox makes it easy to package your application into an OCI-compliant container image. Devbox analyzes your code, automatically identifies the right toolchain needed by your project, and builds it into a docker image.
84
110
85
-
With a Devbox environment, it’s simple to build the codebase into an OCI-compliant container image. Devbox will automatically detect your toolchain and pull in the correct Dockerfile.
86
-
87
-
1. Open a terminal in a Devbox folder (see above).
111
+
1. Initialize your project with `devbox init` if you haven't already.
88
112
89
113
2. Build the image:
90
114
@@ -96,29 +120,20 @@ With a Devbox environment, it’s simple to build the codebase into an OCI-compl
96
120
97
121
3. Tag the image with a more descriptive name:
98
122
99
-
```
123
+
```bash
100
124
docker tag devbox my-image:v0.1
101
125
```
102
126
103
-
### Auto-detected languages:
104
-
105
-
- Go
106
-
107
-
Want more languages? [Ask for a new Language](https://jetpack-io.canny.io/devbox) or [Contribute one via Pull Request](https://github.com/jetpack-io/devbox/tree/main/tmpl)
108
-
109
-
110
127
## Additional commands
111
128
112
-
`devbox –help` - see all commands
129
+
`devbox help` - see all commands
113
130
114
131
`devbox plan` - see the configuration and steps Devbox will use to generate a container
115
132
116
-
117
133
## Related Work
118
134
119
-
Thanks to [Nix](https://nixos.org/) for providing isolated shells. Devbox is not affiliated with the NixOS project.
120
-
135
+
Thanks to [Nix](https://nixos.org/) for providing isolated shells.
121
136
122
137
## License
123
138
124
-
This project is proudly open-source under the [Apache 2.0 License](https://github.com/jetpack-io/devbox/blob/main/LICENSE) Copyright Jetpack Technologies, Inc.
139
+
This project is proudly open-source under the [Apache 2.0 License](https://github.com/jetpack-io/devbox/blob/main/LICENSE)
0 commit comments