-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dev Container configuration (#42)
This is a fairly simple Dev Container configuration mostly derived from [the one on CargoSense/compare_chain](https://github.com/CargoSense/compare_chain/tree/main/.devcontainer). With this setup, I opened the project in VS Code, clicked the "Reopen in Container" navigation toast thing (or invoke the similar command from the command palette), and waited for the build process to complete. On a Terminal prompt within the Dev Container, I successfully ran `MIX_ENV=test mix test` and got no errors!
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "dart_sass", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "elixir:1.17-otp-27-slim", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installOhMyZsh": false, | ||
"installOhMyZshConfig": false | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/setup.sh", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"EditorConfig.EditorConfig", | ||
"JakeBecker.elixir-ls", | ||
"jasonnutter.vscode-codeowners" | ||
] | ||
} | ||
} | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
mix local.hex --force | ||
mix deps.get |