Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshbuker/dev-containers
Default dev container configs for quickly adding dev container support to a new project.
https://github.com/joshbuker/dev-containers
Last synced: 9 days ago
JSON representation
Default dev container configs for quickly adding dev container support to a new project.
- Host: GitHub
- URL: https://github.com/joshbuker/dev-containers
- Owner: joshbuker
- License: mit
- Created: 2023-03-05T04:24:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-21T03:23:49.000Z (3 months ago)
- Last Synced: 2024-08-21T04:35:40.701Z (3 months ago)
- Language: Dockerfile
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# dev-containers
Default dev container configs for quickly adding dev container support to a new project.
## Available features
https://containers.dev/features
Add with:
```json
"features": {
"": {
"version": "latest"
}
}
```## `.env` configuration
Add the following to your `devcontainer.json` file:
```json
// Set the environment variables
"runArgs": ["--env-file",".env"],
```Or if you're using docker-compose, add the following under `app:`:
```yaml
env_file:
- ../.env
```This will use the `.env` file in your project root for importing env variables.
## mounting a local folder
For example, to map `~/linux` on the host to `/linux/kernel` on the container:
```json
// Mount ~/linux to /linux/kernel
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/linux,target=/linux/kernel,type=bind,consistency=cached"
],
```Or map from the project root:
```json
"mounts": [
"source=${localWorkspaceFolder}/.config/.wrangler,target=/home/node/.config/.wrangler,type=bind,consistency=cached"
],
```## Install an apt dependency
Some applications may require a dependency such as `imagemagick`. Add the following to the Dockerfile, replacing `imagemagick` with your required dependencies:
```Dockerfile
RUN apt-get update && apt-get install -y imagemagick
```